简体   繁体   English

我如何从C#中的Sqlserver 2008数据库表将数据插入MS Access

[英]how can i insert data into MS Access from Sqlserver 2008 database table in C#

I am using this query for insert data into MS Access from Sql server 2008 database using C# 我正在使用此查询从SQL Server 2008数据库使用C#将数据插入MS Access

 INSERT INTO
 Table1([sno],[DataOfCreation],[Time],[IdentityType],[Description],[SpenderName],[Amount],[VoucherNo],[Session],[Mid],[Type])select
 [sno],[DataOfCreation],[Time],[IdentityType],[Description],[SpenderName],[Amount],[VoucherNo],[Session],[Mid],[Type]
 from
 [OLEDB;Provider=SQLNCLI10;Server=CMACHINE-PC\\SQLEXPRESS;Database=Voucher;].Voucher_Details";

But I found an Error : 但是我发现一个错误

"Could not found installable ISAM" .

Can Anyone help me to solve this problem 谁能帮我解决这个问题

ISAM drivers are used by Access to update file formats other than its own. Access使用ISAM驱动程序来更新其自身以外的文件格式。 If the path of the ISAM driver in your Windows Registry is not valid, or if the ISAM driver does not exist, the problem may occur. 如果Windows注册表中ISAM驱动程序的路径无效,或者ISAM驱动程序不存在,则可能会出现问题。

This error will also be generated when the syntax of the connection string is incorrect. 如果连接字符串的语法不正确,也会产生此错误。 This commonly occurs when using multiple Extended Properties parameters. 使用多个扩展属性参数时,通常会发生这种情况。 Below is an example: 下面是一个示例:

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\DB.mdb;Extended Properties=""Access 8.0;HDR=NO;IMEX=1"""

See your datasource is quoted or not. 查看您的数据源是否被引用。 This must be a problem in connection string. 连接字符串中一定有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用C#从gridview控件批量插入MS-Access表? - How can I bulk insert to MS-Access table using C# from gridview control? 无法从Visual C#将数据插入MS Access数据库 - Unable to insert data into MS Access database from Visual C# 如何在数据库中创建表,该表存储来自MS Access数据库中2个不同表的数据c#WPF中 - How to create table in database that stores data from 2 different tables in MS access Database in c# WPF 如何使用C#将数据从datetimepicker插入到ms访问? - How to insert data from datetimepicker to ms access using c#? 如何在单击 C# MVC 中的行中的按钮时将表行中的数据插入数据库 - How can i insert data from a table row into Database on clicking a button in the row in C# MVC 如何使用C#从MS Access数据库的两个以上表中检索数据 - How to retrieve data from more then two table of MS Access database using c# 如何使用C#将DataGridView数据插入Access数据库表中? - How to insert DataGridView data in to table of access database using c#? 使用C#代码从另一个数据库插入MS Access数据库 - insert into ms access db from another database with c# code 如何检查记录是否存在并在C#中的ms Access数据库中插入 - How to check if record exists or not and insert in ms access database in c# 如何在ms访问数据库中插入带主键的记录c# - How to insert a record with a primary key in ms access database c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM