Results 1 to 4 of 4

Thread: Database Problem

  1. #1

    Thread Starter
    Hyperactive Member wasiq's Avatar
    Join Date
    Jan 2000
    Location
    Karachi, Sindh, Pakistan
    Posts
    274

    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.

  2. #2

    Thread Starter
    Hyperactive Member wasiq's Avatar
    Join Date
    Jan 2000
    Location
    Karachi, Sindh, Pakistan
    Posts
    274
    Another thing I forgot to tell, both the tables are returning their records if accessed from Query Analyzer.

  3. #3
    Ernst Preuss
    Guest

    Post 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

  4. #4

    Thread Starter
    Hyperactive Member wasiq's Avatar
    Join Date
    Jan 2000
    Location
    Karachi, Sindh, Pakistan
    Posts
    274
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width