Discussion Locked

"No Current Row" Error on VB6/MS SQL App

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know why I am getting a "No Current Row" error message on our VB6 app quering a MS SQL Server (6.5). The strange part is that our developers are not getting the errors, just the users and on top of that, not all the users are getting this error.

We are using RDO connections to SQL via ODBC. The users are running both Win98 and W2K Prof.

It is such a random problem that sometimes the users get it and sometimes not.

I am wondering if it could be a missing DLL or other support file that is included in VB6 that the users don't have ?

Any info will be appreciated..

Mark

7 replies

by sl-campbell

I would say that this is/can be happening because the pointer is at the BOF or EOF and the code is trying to take some action on the current record - of which there isn't one. This often happens after the deletion of the first or last record, (or possibly after the deletion of any record with-out moving the pointer to the next record), and now the pointer is either at the BOF or EOF or on a deleted recorded. This can also happen when code that responds to the user clicking to the next or previous record does not check if the pointer has gone before the first or past the last record, into the BOF or EOF. Your data on your form wouldn't get updated and may still show the first/last/deleted record. Then trying to do something with this recordthat is not any longer current would cause this error.
All this needs to first be verified before a fault elsewhere can be given. Capture the error and then see if the rs pointer is on the BOF or EOF or, if a record was deleted, then use the rs.MoveNext or MovePrevious if the rs pointer is not on the BOF or EOF. Be careful that the MoveNext or MovePrevious doesn't cause the pointer to move into the EOF or BOF. If it does, and there are 1 or more records, then move to an existing record.

by mark.thomson

This may be a security permissions issue, do the users who are having problems have the appropriate SQL Server permissions to perform all of the actions that your VB6 app performs

by bucky kaufman (mcsd)

As long as you KNOW that the recordset is not empty, this has to do with your "cursor location".

Since the developers have full access to the database server, they don't get the error. Also your local users probably won't get it either - just the remote users are affected.

The solution is to make sure you are using a client-side cursor.

This discussion is closed to new replies.