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
 Other Forums
 Other Topics
 Missing first record in record set

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-30 : 08:51:42
Mark writes "I am running MySql on a Windows 2000 server box using and MyODBC drivers and IIS 5. For some reason whenever I run code such as below, It skips the first record in the data that should be returned from the query. Could you please help! Thank you,


Mark Figueredo


set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open "DSN=" & strDSN & ";uid=" & strDBUserName & ";pw=" & strDBPassword & ";"
Set objPORS = Server.CreateObject("ADODB.Recordset")
objPORS.Open strQuery,objPOConn, 0, 1


Do While NOT objPORS.EOF

‘ Misc response.writes

objPORS.MoveNext
Loop"

Nazim
A custom title

1408 Posts

Posted - 2002-01-30 : 10:34:31
Did you check the recordcount to find out the no. of records the query returns.


Check whether the no. of records the Query returns in Query Analyser is same as the one it returns in recordset. i think they should be same. possible problem could be the order of returning(am not sure about it too) . another possibility is you might have skipped one record before going in the loop.



--------------------------------------------------------------
Dont Tell God how big your Problem is , Tell the Problem how Big your God is
Go to Top of Page
   

- Advertisement -