[AccessD] VB.Net using ADO.Net to pass data from one DB to Another

ACTEBS actebs at actebs.com.au
Sat Nov 27 03:29:52 CST 2010


Hi Everyone,

 

Long time no speak.

 

Sorry for posting a VB.Net and ADO.Net question here, but I've wasted so
much time on this, I thought maybe someone from my old AccessD Group might
know the answer. This is my first solo attempt at a VB.Net app, so be kind.

 

I am developing quite simple application for work that imports a CSV file
into an Access DB that is created on the fly for the task. Everything works
as expected and the data is posted to the table ready for
manipulation/changing and prepared for the transfer and import into the file
separate Access DB.

 

For the life of me I can't figure out how to open 2 separate DB's and
transfer data from one to the other. In fact, trying to find decent examples
of using VB.Net with ADO.Net is in itself a task.

 

Can anyone here please give me an example? One that shows the insert data
syntax? Something like I'm used to would be handy as in similar methodology
to DAO like:

 

Dim dbs01 as dao.database 'Source DB

Dim dbs02 as dao.database 'Destination DB

Dim rst01 as dao.recordset

Dim rst02 as dao.recordset

Dim StrSQL as string

 

Set dbs01 = CurrentDb()

Set dbs02 = OpenDatabase(BELocation)

 

Etc etc ..

 

With rst01

                Do until rst01.EOF

                                With rst02

                                                !MyField = rst01!SourceField

                                End with

                loop

End with

 

Any help would be most appreciated.

 

Thanks

 

Vlad






More information about the AccessD mailing list