David DB
2009-03-05 20:01:19 UTC
Hi,
Using VB6 and ADO, SQL server I have a problem when using server side
cursors:
Private rsCust As ADODB.Recordset
Private conDB as ADODB.Connection
private sConnect as string
Set connDB = New ADODB.Connection
set rsCust = New ADODB.Recordset
sConnect = "provider=sqloledb;server=" & DBCONNNAME & ";database=" &
DBNAME & "; uid=" & DBUSER & ";pwd=" & DBPASSW
connDB.CursorLocation = adUseServer
connDB.ConnectionString = sConnect
connDB.Open
rsCust.Open "Customers", connDB, adOpenDynamic, adLockOptimistic
When opening the recordset the recordcount is -1. If using client side
cursor it works OK, but we need to use server side because of multiuser, or
what ?
It seems that the recordset is not empty but recordcount is -1. Is there
another way to check the recordcount ?
David
Using VB6 and ADO, SQL server I have a problem when using server side
cursors:
Private rsCust As ADODB.Recordset
Private conDB as ADODB.Connection
private sConnect as string
Set connDB = New ADODB.Connection
set rsCust = New ADODB.Recordset
sConnect = "provider=sqloledb;server=" & DBCONNNAME & ";database=" &
DBNAME & "; uid=" & DBUSER & ";pwd=" & DBPASSW
connDB.CursorLocation = adUseServer
connDB.ConnectionString = sConnect
connDB.Open
rsCust.Open "Customers", connDB, adOpenDynamic, adLockOptimistic
When opening the recordset the recordcount is -1. If using client side
cursor it works OK, but we need to use server side because of multiuser, or
what ?
It seems that the recordset is not empty but recordcount is -1. Is there
another way to check the recordcount ?
David