dbf file conversion into sql

  • anitha.cherukuri

    SSCommitted

    Points: 1514

    Hi friends

    I have dbf file.I have to convert that file into SQL tabel.

    My team leader suggested import wizard.

    But i dont know how to use taht one.

    Can anybody help me ?

  • SQLFanatic

    SSCommitted

    Points: 1640

    What is the source of your dbf file ?

    Depending upon the source of the dbf file you can look into the following.

    Some of the sources for dbf files are Access, dbase or if it's Foxpro file, you may have to install additional drivers.

    You could use the following methods.

    1) Use SSIS

    2) Use Recordset query

    3) Use Linked server

    🙂

    ________________________________________________________________
    "The greatest ignorance is being proud of your learning"

  • gorthog

    Ten Centuries

    Points: 1004

    With a 32-bit SQL Server installation, you can use the Microsoft dBase Driver through the MSDASQL provider:

    select *

    into <tablename>

    from openrowset('msdasql', 'driver={microsoft dbase driver (*.dbf)};dbq=c:\', 'select * from filename')

    You just need to provide the name of the target table, and the path and filename (without the extension) of the source file. Assuming the source file is 'c:\data\testfile.dbf', then the statement would read:

    select *

    into testTable

    from openrowset('msdasql', 'driver={microsoft dbase driver (*.dbf)};dbq=c:\data\', 'select * from testfile')

    Hope this helps.

  • anitha.cherukuri

    SSCommitted

    Points: 1514

    Hi

    Thanks for your help.

    select *

    into test

    from openrowset('msdasql', 'driver={microsoft dbase driver (RubbishDays2008_Property.dbf)};dbq=c:\', 'select * from filename')

    I am getting following error..

    Msg 7403, Level 16, State 1, Line 1

    The OLE DB provider "msdasql" has not been registered.

  • anitha.cherukuri

    SSCommitted

    Points: 1514

    Hi

    If i want to use SSIS,What is the method for that?

  • gorthog

    Ten Centuries

    Points: 1004

    The syntax for the 'RubbishDays2008_Property.dbf' file should be:

    select *

    into test

    from openrowset('msdasql', 'driver={microsoft dbase driver (*.dbf)};dbq=c:\directory\', 'select * from RubbishDays2008_Property')

    Replace 'dbq:=c:\directory\' with the appropriate path where the 'RubbishDays2008_Property.dbf' file is stored.

    This thread is in the T-SQL (SS2K8) forum. If you are using the 64-bit version of SQL Server 2008, then you are out of luck; the 64-bit version of the MSDASQL provider cannot access the 32-bit dBase driver. Currently, there is no 64-bit version of the dBase driver.

  • SQLFanatic

    SSCommitted

    Points: 1640

    For Using SSIS:

    http://timothychenallen.blogspot.com/2007/07/how-to-import-dbase-tables-into-sql.html

    ________________________________________________________________
    "The greatest ignorance is being proud of your learning"

  • anitha.cherukuri

    SSCommitted

    Points: 1514

    Thanks for your help.

    i will work it out...

  • Cees Cappelle-442904

    SSC Eights!

    Points: 917

    Hi all,

    I tried this:

    select *

    --into test

    from openrowset('msdasql', 'driver={microsoft dbase driver (*.dbf)};dbq=D:\McBAM\BamTst\Data\', 'select * from MT101108')

    And got these errors:

    OLE DB provider "msdasql" for linked server "(null)" returned message "[Microsoft][ODBC dBase-stuurprogramma]Algemene waarschuwing Kan de registersleutel Temporary (volatile) Jet DSN for process 0x704 Thread 0x598 DBC 0x3598aec Xbase niet openen.".

    OLE DB provider "msdasql" for linked server "(null)" returned message "[Microsoft][ODBC dBase-stuurprogramma] Er is een schijf- of netwerkfout opgetreden.".

    Msg 7303, Level 16, State 1, Line 1

    Cannot initialize the data source object of OLE DB provider "msdasql" for linked server "(null)".

    I'm not very proficient in Jet connections, so can you please help me out?

    Cees Cappelle

  • gomezsugar70

    Grasshopper

    Points: 17

    Hi guys,

    Thanks a lot for the information and suggestions here.,

    This is really an advantage in my part, and this help me a lot here,

    By the way I am new in this site and thanks for the information anyway!

    cures for depression

Viewing 10 posts - 1 through 10 (of 10 total)

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