opendatasource

  • Hi all,

    I m trying to access the foxpro data using Opendatasource through query Analyzer.  I am getting the following error:

    OLE DB error Trace [OLE/DB provider 'MSDASQL IDBSchemaRowset::GetRowset returned 0x800040005:

    Thanks

     

     

  • See if any of these might be of any help.

    http://support.microsoft.com/search/default.aspx?qu=183060&catalog=LCID%3D1033

    /Kenneth

  • no it didnt help.  Actually i m able to access the MSaccess data (.mdb) from Query Analyzer but i am not able to connect to the foxpro database.

    I m using the following query to access the Foxpro Data:

     

    Select * from opendatasource('MSDASQL',

    'Driver=Microsoft dBase Driver (*.dbf);

    SourceDB=E:\data;Source Type=DBF;Exclusive=No;BackgroundFetch=Yes;

    Collate=machine;Deleted=yes')...[dbo.model.dbf]

     

    note model.dbf exist in the E:\Data folder.

     

  •  

    You are better off using the FoxPro ODBC Driver or the FoxPro OLEDB Provider:

    ODBC Driver: 

    SELECT s.*
    FROM OPENROWSET('MSDASQL', 'DRIVER={Microsoft Visual FoxPro Driver};
    Exclusive=No;Collate=Machine;Deleted=Yes;Null=No;
    SourceDB=e:\data\Model.dbc;SourceType=DBC;',
    'SELECT * FROM YourTable')s
     

    OLE DB provider:

    SELECT s.*
    FROM OPENROWSET('VFPOLEDB.1',
    'e:\data\Model.dbc';;,
    'SELECT * FROM YourTable') s
     
     
    hth


    * Noel

  • the commands specified above cannot be used as i do not have a VFP database (.dbc).  I only have the .dbf which is a foxpro data file

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply