Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002

    Question Unanswered: Problem accessing SQL 2000 from C++

    I have a Borland Builder C++ application accessing a SQL Server 7 database.

    This database has a 'linked server' which is a SQL Server 2000 database.

    I can run queries successfully using both databases from SQL Query Analyser but when I execute the same SQL within my application I get the error OLE DB Provider 'MSDASQL' supplied inconsistent metadata.

    Can anyone help please?

  2. #2
    Join Date
    Feb 2002
    Houston, TX
    Let me statr this by saying that I am NOT a C++ programmer and have never called SQL 2K from SQL7.

    I do have a few suggestions...

    First, are you useing the correct driver to connect to SQL7. I would first try a driver intended for SQL2k.

    If you are using a SQL7 driver then are you returning results directly form SQL2K? You may be incountering a data type not supported by a SQL 7 driver or a data type who's characteristicts have changed between versions. If this is the case try returning results from SQL2k to SQL 7 and then from SQL 7 to your app.

    It isn't much but maybe this will get you where you need to go.
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Jan 2002
    I have seen this error before. I don't remember the exact situation but it was definetly the same error message. It had to do with a a bug in SQL when you delete a column of a table. The colid information in syscolumns would not be updated. So the colid field would have gaps in it. For example 1,2,3, gap, 5, 6 etc. You can identify this by looking at the syscolumns data for the table/tables in question. I hope this helps. I have fixed this by creating a new table, copying the data, droping the old, renaming the new and applying indexes and constraints.
    Good Luck

Posting Permissions

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