通过访问sql插入数据 [英] insert the data from access to sql
本文介绍了通过访问sql插入数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好!
我想在sql中创建表的表结构,因为它存在于access中,并且我想在表中插入值.
我该怎么办?
请帮我
Hi there!
I want to create the table struture of the table in sql as it is present in access and i want to insert the value in the tables.
How shall i do this?
Plz help me
推荐答案
不确定在此处的ASP.NET标记.
看看这些:
将数据从Excel或Access使用以下方式导入到SQL Server TSQL脚本 [在C#.NET中对SQL Server的MS访问 [ ^ ]-它说:
- 创建与Access数据库的DAO连接(添加对DAO库的引用,创建一个新的DBEngine,然后使用其OpenDatabase方法获取数据库引用):
Not sure on the tag ASP.NET here.
Have a look at these:
Import Data to SQL Server from Excel or Access using TSQL Script[^]
MS Access to SQL Sever in C#.NET[^] - it says:
- Create a DAO connection to your Access database (add a reference to the DAO library, create a new DBEngine and then use its OpenDatabase method to get a Database reference):
DBEngine dbe = new DBEngine();
Database db = dbe.OpenDatabase(pathToDatabase);
--use SMO or
--plain old T-SQL:
ALTER TABLE table1
ADD CONSTRAINT table1_fkfield_fk FOREIGN KEY (fkfield)
REFERENCES table2 (pkfield)
请参阅以下文章,了解如何从Access中检索数据. MSAccess [ ^ ]
一旦有了数据,就应该能够将数据推送到SqlServer.
Refer the following article on how to retrieve the data from Access. MSAccess[^]
Once you have data you should be able to push the data to SqlServer.
这篇关于通过访问sql插入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文