-
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.
-
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
-
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.