oledbconnection

'Microsoft.ACE.OLEDB.12.0 is not registered in the local machine.'

别说谁变了你拦得住时间么 提交于 2020-02-06 11:30:40
问题 I have installed Microsoft Access Database Engine 2010 Redistributable http://www.microsoft.com/en-us/download/details.aspx?id=13255 on the Windows 2008 server. However, when I ran my web application to import a spreadsheet table to the database. It complains with the error message - "Microsoft.ACE.OLEDB.12.0 is not registered in the local machine." I have tested my code and works in my Windows 7 local machine. Any idea? 回答1: There is a problem with Microsoft.ACE.OLEDB.12 when

'Microsoft.ACE.OLEDB.12.0 is not registered in the local machine.'

元气小坏坏 提交于 2020-02-06 11:24:34
问题 I have installed Microsoft Access Database Engine 2010 Redistributable http://www.microsoft.com/en-us/download/details.aspx?id=13255 on the Windows 2008 server. However, when I ran my web application to import a spreadsheet table to the database. It complains with the error message - "Microsoft.ACE.OLEDB.12.0 is not registered in the local machine." I have tested my code and works in my Windows 7 local machine. Any idea? 回答1: There is a problem with Microsoft.ACE.OLEDB.12 when

OleDbConnection close method taking long execution time

让人想犯罪 __ 提交于 2020-01-30 09:45:07
问题 conStr = String.Format(conStr, FilePath, isHDR); OleDbConnection connExcel = new OleDbConnection(conStr); OleDbCommand cmdExcel = new OleDbCommand(); OleDbDataAdapter oda = new OleDbDataAdapter(); DataTable dt = new DataTable(); cmdExcel.Connection = connExcel; //Get the name of First Sheet connExcel.Open(); DataTable dtExcelSchema; dtExcelSchema = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); string SheetName = dtExcelSchema.Rows[0]["TABLE_NAME"].ToString(); connExcel.Close();

OleDbConnection() opens an Excel file in any open Excel window. But does not if there isnt a window open

亡梦爱人 提交于 2020-01-14 08:41:08
问题 I am writing an application which uses an OleDbAdapter to access information in an Excel file. When I try to create a connection to the Excel file if the user has another (unrelated) Excel file open on their desktop then the file being connected to by the adapter opens in this window in Read-Only format. If the user does not have an instance of Excel open then the files stay hidden. Here is my code: foreach (item app in apps) { DataTable dt = new DataTable(); string CnStr = ("Provider

Updating records in MYSQL with SSIS

偶尔善良 提交于 2020-01-07 05:35:19
问题 I am writing an SSIS package that has a conditional split from a SQL Server source that splits records to either be updated or inserted into a MYSQL database. The SQL Server connection has provider .NET Provider for OldDB\SQL Server Native Client 10.0. The MYSQL connection is a MYSQL ODBC 5.1 ADO.NET connection. I was thinking about using the OLE DB Command branching off of the conditional split to update records but I connect use this and connect to the MYSQL database. Does anyone know how

How to query a Foxpro .DBF file with .NDX index file using the OLEDB driver in C#

大憨熊 提交于 2020-01-06 14:58:35
问题 I have a Foxpro .DBF file. I am using OLEDB driver to read the .DBF file. I can query the DBF and utilize its .CDX index file(cause it is automatically opened). My problem is that I want to query it with the .NDX index file (which is not automatically opened when the .DBF is opened). How can I open the .NDX file in C# using OLEDB driver cause the DBF is really big to search for a record without the index? Thanks all! Here is the code I am using to read the DBF. OleDbConnection oleDbConnection

How to query a Foxpro .DBF file with .NDX index file using the OLEDB driver in C#

风流意气都作罢 提交于 2020-01-06 14:58:19
问题 I have a Foxpro .DBF file. I am using OLEDB driver to read the .DBF file. I can query the DBF and utilize its .CDX index file(cause it is automatically opened). My problem is that I want to query it with the .NDX index file (which is not automatically opened when the .DBF is opened). How can I open the .NDX file in C# using OLEDB driver cause the DBF is really big to search for a record without the index? Thanks all! Here is the code I am using to read the DBF. OleDbConnection oleDbConnection

'Microsoft.ACE.OLEDB.12.0' provider is not registered -but it is

六眼飞鱼酱① 提交于 2020-01-05 19:06:13
问题 Short and sweet: app works on x86 machine but not on x64 (tried on a 2008 Server and a Windows 8) Microsoft Access Database Engine 2010 already installed (also have Microsoft Office 2007 Access Database Engine installed) MS Office not installed confirmed the existence of C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\ACEOLEDB.DLL Code: string conn = "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;"; OleDbConnection _connOle = new

ExecuteNonQuery: Connection property has not been initialized

江枫思渺然 提交于 2019-12-31 05:36:12
问题 I'm getting the following error ExecuteNonQuery: Connection property has not been initialized. When the following code is run Private Sub btnUpdate_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click Using con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Comp-296\Project1\Project1\Game_time.mdb") Using cmd = New OleDbCommand("UPDATE User-scores SET User_Name = @User_Name Game_Name = @Game_Name Score = @Score, [Time/Date] = @dt") con.Open() cmd.Parameters

Why one Public OleDbConnection is deprecated? Alternative to solve the bug: too many connections opened

我怕爱的太早我们不能终老 提交于 2019-12-28 06:34:44
问题 I have to work with a Project made by another developer. A project Win-Form with Visual-Basic code, with MS-Access as db and some OleDbConnections. There is a bug: sometimes the application can't open the OleDbConnection because the max number of connections has been reached on the db. I know the best way to use the connections is this: Using cn As New OleDbConnction(s) ... cn.Close() End Using But in the project there are many classes to work with the db, and in many of these classes there