-
Database Problem
I have an SQL 7 database and there are 2 tables in it. Both have 3 rows each. When I try to access the records from table 'USERS', it works fine, but when I try access records from the table 'CONTACTS', it gives a record count or -1. I am using ADO 2.5 for accessing. Can anyone please tell me what the problem is. Its really urgent for me.
-
Another thing I forgot to tell, both the tables are returning their records if accessed from Query Analyzer.
-
Recordset type
When opening the recordset are you using "Static" rather tha 'dynamic','keyset' or 'forward only'?
Only 'static' allows for returning the recordcount like so..
NoOfRecords = Rs.Recordcount
-
I am using static, anyways, I think I figured out what the problem was. I was connecting directly to the SQL server using ODBC Data Source, but now I am connecting using an ODBC Data Source which seems to have solved the problem.