|
-
Apr 24th, 2001, 01:52 PM
#1
Thread Starter
Junior Member
Simple sql statement , can't figure out what's wrong!
I just made this SIMPLE sql statement
sqldouble="SELECT nick FROM Utenti WHERE nick=" & request.form("struser")
this should select the coloumn "nick" from the table utenti where nick is like "something you typed in the form"
but when i call this:
rs.open sqldouble, conn
it give this error:
i'm translating it from italian
Microsoft OLE DB Provider for ODBC Drivers error "80040e4e'
Operazione annullata. (translated is "operation aborted")
/change3.asp, line 24
If i change = with LIKE, the error is:
Microsoft OLE DB Provider for ODBC Drivers error "80004005'
[Microsoft][ODBC Driver Manager] Nome della origine dati troppo lungo. (the Data Source name is too long)
/change3.asp, line 24
rs is just an adodb recordset and conn is:
set conn=server.createobject("ADODB.Connection")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("forum.mdb")
I used the database many times but i can't figure out what's wrong
PLEASE HELP!
-
Apr 24th, 2001, 02:56 PM
#2
Hyperactive Member
Because it's going to be a string and not a number you will need to write it like...
Code:
sqldouble="SELECT nick FROM Utenti WHERE nick='" & request.form("struser") & "'"
The only changes I made was I added an ' before and after the Request.Form...
If you think education is expensive, try ignorance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|