如何将数据从在线SQL服务器表复制到本地访问数据库表? [英] How to copy data from online SQL server table to local access database table?

查看:104
本文介绍了如何将数据从在线SQL服务器表复制到本地访问数据库表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我必须创建一个应用程序,将我的在线SQL服务器数据库中的数据同步到本地MS Access(.mdb)数据库。为此,我将从SQL服务器读取记录到datatable中,并使用循环将这些记录逐个插入本地数据库,但这需要花费大量时间。

任何人都可以帮我更好地完成这项任务



这个数据同步必须在点击按钮时完成,因为我必须将应用程序分发到整个州的不同计算机。



提前感谢



我的尝试:



 '  MyDataSet是一个函数从联机SQL Server返回记录 
Ds = MyDataSet( 从AllCases中选择* O

对于 i = 0 Ds.Tables( 0 )。Rows.Count - 1
InsertStatement()
下一步

解决方案

这不是一个确切的答案,但是 - 我希望 - 有点有用的信息......

MS Access能够连接到MS SQL Server,请参阅:导入或链接到SQL Server中的数据数据库 - 访问 [ ^ ]



您可能想要使用描述的方法这里: vb.net - DataTable访问数据库表DaniWeb [ ^ ]

Hi everyone
I have to make a application to sync data from my Online SQL server database to local MS Access(.mdb) database. For this I am reading records from SQL server into datatable and inserting these records one by one using loop to the local database but it takes lot of time.
Can anybody help me in doing this task in a better way

This data sync has to be done on button click because I have to distributed the application to different computers across the state.

thanks in advance

What I have tried:

'MyDataSet is a function which return Records from Online SQL Server
        Ds = MyDataSet("Select * from AllCases " , "O")
        
        For i = 0 To Ds.Tables(0).Rows.Count - 1
              InsertStatement()
        Next

解决方案

This is not an exact answer, but - i hope - a bit useful information...
MS Access is able to connect to MS SQL Server, see: Import or link to data in an SQL Server database - Access[^]

You may want to use method described here: vb.net - DataTable to Access Database Table | DaniWeb[^]


这篇关于如何将数据从在线SQL服务器表复制到本地访问数据库表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆