Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 VB/SQL/ADO

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-03-07 : 08:21:09
Mrinalini writes "I am using VB 6.0 sp5 to access SQL server through ADO.



Set rsWorkstations = New ADODB.Recordset
'rsWorkstations.CursorLocation = adUseClient
'rsWorkstations.CacheSize = 50

rsWorkstations.Open " tipmgr5.sp_GetWorkstations " & ModelID & "," & ModelRunID, db, adOpenForwardOnly, adLockReadOnly

rsWorkstations.MoveFirst

While Not rsWorkstations.EOF
....
....
.....
rsWorkstations.movenext
wend

Above code for some reason creates the recordset and EOF property is false and everything is fine sometimes, but does not create recordset and EOF property is TRUE most of the time."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-03-07 : 08:22:44
It would help if you could elaborate on "sometimes". Does it work for certain ModelID values and not others? Have you tested your stored procedure in query analyzer with the same parameters?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-07 : 08:24:35
It depends on the result set returned by the query. If there are no records returned by query, EOF is true. Give more details on what you are trying to know

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -