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

ADO Recordset

Status
Not open for further replies.

MJPPaba

MIS
May 28, 2003
142
0
0
GB
Hi All,

Im fairly new to Sybase but reasonably familiar with SQL and competent with Access etc.

My problem is this, I have an sybase warehouse and an access client end database.

my code is...

Dim myCnn As ADODB.Connection
Dim myRST As ADODB.Recordset

mySQL = "SELECT * "
mySQL = mySQL & "From myTable "

Set myCnn = New ADODB.Connection

myCnn.Open "driver={SYBASE SYSTEM 11};srvr=mySvr;database=myDbase;uid=myUserID;pwd=myPwd"

Set myRST = New ADODB.Recordset

myRST.Open mySQL, myCnn

MsgBox myRST.RecordCount

myCnn.Close

Set myCnn = Nothing



result are -1 in the msgbox.

where am I going wrong?

Cheers

Matt
 
Try adding CursorType:
Code:
myRST.Open mySQL, myCnn, adOpenStatic

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top