J
John Burns
Bob,
I've been reading some of your posts in google groups regarding
Paramaterizing SQL queries.
I'm trying to do things theright way, but having problems and thought you
might be able to help me out.
I'm opening an access database in an include file at the start of the asp
file.
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\testdb.mdb;"
So far so good.
I then tried saving a query in Access - its named 'qlogin' and consists of a
very simple:
SELECT *
FROM users
WHERE login=[formusername] And userpassword=[formpassword];
What lines of asp do I need to then get data from the record set, ie:
RS("login")
I am also interested in a method someone else brought up and you weren't too
keen on which used dynamic SQL but with the parameters in a @P1 type naming
convention. eg: SQL = "EXEC qry_Listings @P1" & varPI
How would I use this to return a recordset?
Thanking you in advance
John Burns
I've been reading some of your posts in google groups regarding
Paramaterizing SQL queries.
I'm trying to do things theright way, but having problems and thought you
might be able to help me out.
I'm opening an access database in an include file at the start of the asp
file.
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\testdb.mdb;"
So far so good.
I then tried saving a query in Access - its named 'qlogin' and consists of a
very simple:
SELECT *
FROM users
WHERE login=[formusername] And userpassword=[formpassword];
What lines of asp do I need to then get data from the record set, ie:
RS("login")
I am also interested in a method someone else brought up and you weren't too
keen on which used dynamic SQL but with the parameters in a @P1 type naming
convention. eg: SQL = "EXEC qry_Listings @P1" & varPI
How would I use this to return a recordset?
Thanking you in advance
John Burns