Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why doesn't this work?

Status
Not open for further replies.

damann

Technical User
Jul 19, 2000
114
US
query = "SELECT field1 FROM table1"
set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open query, adOpenStatic
 
Just a guess, but your open syntax should look something like this:
objRS.Open query, "DSN=Whatever", adOpenStatic

HTH's... mot98
[pc]

"Every day I learn something new, and forget 10 things I learned long ago!"
 
Well I aleady have the connection opened. Here's the full code:

Set objConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("febs_dev_project.mdb")
objConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open query, adOpenStatic

This is what doesn't work. I don't understand why...

 
did you define adOpenStatic? i think it would be the same as
objRS.Open query, 3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top