transfering data from SQL table into Access table

  • How to transfer SQL Server table data into Ms Access table Programatically  instead of using DTS package

     

  • might not be what you wanna hear, but you can save the dts, then call it from vb. Do you want to avoid the dts all together?

  • i want to do it progrmatically . i dont want to use DTS

  • If you use a linked table in Access to the SQL Server table it can be accesses as local Access table. Then you can transfer data from linked table.

    Regards,
    gova

  • I tried this stattement but it gave following error

     

    INSERT INTO OPENDATASOURCE(

       'Microsoft.Jet.OLEDB.4.0','Data Source="D:\Test.mdb";

       User ID=Admin;Password='

       )... AccesstableName(col1,col2,col3,...coln) SELECT col1,col2,col3,...coln FROM SQLServerTableName

    Server: Msg 7399, Level 16, State 1, Line 1

       OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.

    Authentication failed.

       [OLE/DB provider returned message: Cannot start your application. The

    workgroup information

       file is missing or opened exclusively by another user.]

       OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'

    IDBInitialize::Initialize

       returned 0x80040e4d: Authentication failed.].

    infact the mdb file is not opened or readonly or in exclusive mode and the password is also correct

  • 1 of 2 options are the easiest

    #1  LINK the SQL table in the Access database and then create a query there to load data

    #2  Research LINKED SERVER in BOL and create one for your Access DB THEN write an INSERT INTO query/SP



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

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

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