Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to sync ms access database to sql server database using Microsoft Sync Framework
Posted
Updated 11-Jan-10 18:07pm
v2

PLEASE don't post fake 'answers' they actually make it look like the question was answered, and stop people answering. Don't tell us it's 'urgent', if it's that urgent, you should perhaps use google, buy a book, or pay someone to help you. Free help, you need to take as it comes, no-one will answer faster because you are under the gun.

Microsoft Sync Framework gets me a ton of google hits. Perhaps you need to look there.
 
Share this answer
 
There is no Access - Sync Framework Provider (as far as I know), however you could eiterh create one using the Simple Provider Framework (that is part of Sync Framework), or you could use the existing SQL Server providers. What I mean by this is that you could move the data in your Access database to SQL Server (using the Access Upsizing Wizard) and then continue to use Access for your application (forms and reports) but Sync Framework would just sync the data from one SQL Server database to another.

Liam Cavanagh
Sr. Program Manager
Microsoft Sync Framework / SQL Azure
 
Share this answer
 
This may hel;p you

Using dt As New DataTable()
Using conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/Administrator.RIEL/My Documents/Visual Studio 2008/Projects/WindowsApplication2/WindowsApplication2/mydb.mdb;Persist Security Info=True")
'Using cmd As New OleDbCommand(sql, conn)
Using cmd As New OleDbCommand([String].Format("select * from {0}", "Table1"), conn)
Using adapter As New OleDbDataAdapter(cmd)
cmd.CommandType = CommandType.TableDirect
cmd.Connection.Open()
adapter.SelectCommand.CommandTimeout = 240
adapter.Fill(dt)
adapter.Dispose()
End Using
End Using
End Using

Using conn2 As New SqlConnection("Data Source=SYS-DOT-NET-01;User ID=sa;Password=sql;Initial Catalog=dcc")
conn2.Open()
Using copy As New SqlBulkCopy(conn2)
copy.DestinationTableName = "demo"
copy.BatchSize = 1000
copy.BulkCopyTimeout = 240
copy.WriteToServer(dt)
copy.NotifyAfter = 1000
End Using
End Using
End Using
 
Share this answer
 
Comments
Bawa904 18-Sep-17 8:58am    
It really worked for me. Thanks for this solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900