本文介绍了将复制Sql表数据出错到Access表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

vb.net如何将MS-SQL表的数据复制到MS-Access表,我尝试使用以下代码:

'''''''''''''''

Dim AccessConn As new ystem.Data.OleDb.OleDbConnection(Provider = Microsoft.ACE.OLEDB.12.0; Data Source =+ AccessDB)

AccessConn.Open( )



Dim AccessCommand As New System.Data.OleDb.OleDbCommand(INSERT INTO ResourceDetailGroup FROM [ResourceDetailGroup] IN''[SQLOLEDB; Driver = {SQL Server}; Server = SQLEXPRESS; Database = Database; Integrated Security = SSPI];,AccessConn



AccessCommand.ExecuteNonQuery()

AccessConn.Close ()

''''''''''''''
但是抛出语法错误在INSERT INTO声明中。



给出任何建议



谢谢...

vb.net how to Copy MS-SQL tables's Data to MS-Access Table , i tried with Following code:
''''''''''''''''
Dim AccessConn As New ystem.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + AccessDB)
AccessConn.Open()

Dim AccessCommand As New System.Data.OleDb.OleDbCommand("INSERT INTO ResourceDetailGroup FROM [ResourceDetailGroup] IN '' [SQLOLEDB;Driver={SQL Server};Server=SQLEXPRESS;Database=Database;Integrated Security=SSPI];", AccessConn)

AccessCommand.ExecuteNonQuery()
AccessConn.Close()
'''''''''''''''''''''''''''
but throwing "Syntax error in INSERT INTO statement."

give any suggestion for this

Thanks ...

推荐答案


这篇关于将复制Sql表数据出错到Access表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 00:39