7 Years
Discussion Span
Last Post by samsylvestertty

i'm using vb6 and sql database. while updating the file newly i'm getting the recordcount is -1 ? how can i solve it?


I too don know exactly when it return -1.
I have encountered this error when having connections to more than one database in a single project.
If you are using this recordcount property to check whether a RecordSet is not empty then I would suggest you to use EOF and BOF property of recordset.
for example.
instead of using

if rsStudents.RecordCount > 0 Then


if Not rsStudents.EOF And Not rsStudents.BOF Then

All the best


For your tutoring issues
Learning a programming language is not that tough when you have the logical analyzing skills.
Read books or Try to have someone sharing knowledge. Try to execute a sample program relating the topic.
Only executing a program or programs will allow you to have good knowledge on the topics you covered.

Reading books are not always helpful.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.