When can i get the recordcount is -1? how to solve it? the table is fresh

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

use

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.