how to merge data from one database in ms-Access to other thru Visual Basic

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

I have a database in ms-access and i want to enter records in it from different computers not attached with each other and then merge the data from one database to other through visual basic coding. how to do it.

-- Anonymous, February 09, 2004

Answers

Shelly,

Here is an example of adding records from a SQL Server database to an Access database.

Hope this helps,

Eric

Dim oConn As ADODB.Connection

Dim sSQL As String Create and open a new connection to local MyAccessDB MDB

Set oConn = New ADODB.Connection

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=.\MyAccessDB.mdb;" ' Select all records from Products table in Northwind SQL Server DB ' and place them into a Products_Backup in local MyAccessDB MDB

sSQL = "SELECT * INTO Products_Backup FROM " & _ "[odbc;Driver={SQL Server};Server=(local);" & _ "Database=northwind;Uid=myUsername;Pwd=myPassword;].Products"

oConn.Execute sSQL, , adExecuteNoRecords

-- Anonymous, February 13, 2004


shelly first of all u have to connect 2 diffent computer then u can share that data and u have to write the coding for "winshock" in VB help are available in the MSDN

-- Anonymous, February 19, 2004

Moderation questions? read the FAQ