M
MasterChief
I am trying to connect to a database that is created by a program we
use called TrackIt. When I try to use the RecordCount statement it
always returns -1. I have looked up all the reasons why -1 would come
back and I thought I had fixed everything but it still is having
problems. Here is the part of the code for RecordCount.
Session("dsn") = dsn
Session("dbuser") = dbuser
Session("dbpass") = dbpass
Set Conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open dsn, dbuser, dbpass
rs.Open sql, Conn, adOpenStatic, , adCmdTable
Response.write "<BR>Supports Approx Position: " &
rs.Supports(adApproxPosition) & "<BR>"
intRecordCnt = rs.RecordCount
Response.write "<BR>RecordCount:" & intRecordCnt & "<BR>"
use called TrackIt. When I try to use the RecordCount statement it
always returns -1. I have looked up all the reasons why -1 would come
back and I thought I had fixed everything but it still is having
problems. Here is the part of the code for RecordCount.
Session("dsn") = dsn
Session("dbuser") = dbuser
Session("dbpass") = dbpass
Set Conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open dsn, dbuser, dbpass
rs.Open sql, Conn, adOpenStatic, , adCmdTable
Response.write "<BR>Supports Approx Position: " &
rs.Supports(adApproxPosition) & "<BR>"
intRecordCnt = rs.RecordCount
Response.write "<BR>RecordCount:" & intRecordCnt & "<BR>"