|
-
Jun 22nd, 2000, 06:26 PM
#1
Can anyone see what's wrong with this?
Code:
dim oConn, oRS
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};"
oConn.ConnectionString = oConn.ConnectionString & "DBQ=" & Server.MapPath("../datastore.mdb") & ";" oConn.ConnectionString = oConn.ConnectionString & "PWD=" & sDBPassword
oConn.Open
Set oRS = Server.CreateObject("ADODB.Recordset")
oRS.Open "SELECT * FROM users WHERE username=" & request("user"), oConn
I keep getting a "Too few parameters. Expected 1." error on the last line when I try to open the recordset.
-
Jun 22nd, 2000, 06:48 PM
#2
Fanatic Member
Hi matthewralston
Is yor username a string, because if it is you need to enclose the where Clause in '.
oRS.Open "SELECT * FROM users WHERE username='" & request("user") & "'", oConn
Hope this helps
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jun 22nd, 2000, 07:02 PM
#3
Ah, yeah...cheers. I wondered if it might be that but I couldn't figure out what delimiters to use for a string...
' hey? takes me back to pascal used to usin them as comments now 
Thanks.
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
|