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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB Connection Problems

Status
Not open for further replies.

enak

Programmer
Jul 2, 2002
412
US
I have an ASP that I connect to a db when I submit the page. I have the following code:

set rs = server.CreateObject("ADODB.Recordset")

sSQL = "select * from evaluations where evaluatorid = " & Request.Form("TimeKeeper")
strConn = "Driver={SQL Server}; Server=Enaksystems; Database=AKData; Uid=evaluser; Pwd=pwdeval;"

set akdataConn = Server.CreateObject("ADODB.Connection")
akdataConn.Open(strConn)

rs = akdataConn.Execute(sSQL)

The Execute command has the following parameters:

Execute(CommandText, RecordsAffected, [Options])

This is the ADO 2.7 version but I want to use ADO 2.6 which does not require "RecordsAffected".

How can I change this? I do have .net installed on the same machine.

TIA
Nate
 
Doe this line throw an error?
rs = akdataConn.Execute(sSQL)

seems that even if you have 2.7, you would still be able to use this code (or everyone would have to rewrite a lot of code when then "upgrade" to 2.7) Get the Best Answers! faq333-2924
"A witty saying proves nothing." - Voltaire
mikewolf@tst-us.com
 
OK, for some reason everything seems to be working. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top