oledbconnection

Connecting to an mdb file using OdbcConnection in VS2013

百般思念 提交于 2019-12-13 06:53:18
问题 I am trying to connect to an mdb file from C# 2013 using OdbcConnection. I used to have Office 2000 on my Windows 7 and Windows 8 machines, but I have upgraded to Office 2013 on both and it now longer works on either. My database is still in mdb format. Here's the code: const string myConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Path\Mydb.mdb"; OdbcConnection connRL = new OdbcConnection(); connRL.Open(); Whatever I have tried I get the following error: ERROR [IM002]

ACE oleDb drivers unable to handle huge excel files

柔情痞子 提交于 2019-12-12 10:09:02
问题 Does ACE OLEDB drivers have any known issues with larger files? I am using the below code to retrieve the worksheets in a 400Mb xls file public string[] GetWorkSheets() { var connectionString = "Provider=Microsoft.ACE.OleDb.12.0; data source=c:\filepath\filename.xls; Extended Properties=\"Excel 8.0;IMEX=1;HDR=YES;\""; DataTable dataTable; using (OleDbConnection connection = new OleDbConnection(connectionString)) { connection.Open();//Exception thrown here for large files dataTable =

No value given for one or more required parameters When all parameters are given

不问归期 提交于 2019-12-12 05:14:41
问题 The Error i get is An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll Additional information: No value given for one or more required parameters. but this is when all parameters a present code bellow: private OleDbDataReader dbReader;// Data Reader object string sConnection = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=ICTSchool.accdb"; string sql; OleDbConnection dbConn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source

Connection String over network for oledb

蹲街弑〆低调 提交于 2019-12-12 04:46:11
问题 What can be the problem with following connectionStrings string constr = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=\\otherPCName\SmoeSharedFolder\test.mdb;"; Or string constr = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=\\192.168.14\SmoeSharedFolder\test.mdb;"; No Problem with following connection String, when i access database on that PC otherCP string constr = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=D:\SmoeSharedFolder\test.mdb;"; Also I can open a text file from other

Microsoft SQL Server 2014 over network. Oledb Connection String

依然范特西╮ 提交于 2019-12-12 03:19:50
问题 I cannot find an appropriate connection string to a Microsoft SQL server, it's the 2014 developer edition. My current provider is this: string strAccessConn = "Provider=SQLNCLI11;Data Source=10.211.55.7;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User Id=pos;Password=password;"; However, I get this error, Error For reference, this is my source code. string strAccessConn = "Provider=SQLNCLI11;Data Source=10.211.55.7,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User Id=pos

The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode

拥有回忆 提交于 2019-12-12 02:42:31
问题 I'm trying to run a job in SQL Server Management Studio that executes a SSIS package. The SSIS package copies data from an excel file to a database. I installed the 64-bit version of Microsoft Access Database Engine (https://www.microsoft.com/en-us/download/details.aspx?id=13255). When I tried to run the SSIS package by itself (through Data Tools, not as a job) it displayed an error about ACE.OLEDB not being registered. I got the same error when running the SSIS package as a job. I

SQL OleDBCommand selecting Excel Columns

亡梦爱人 提交于 2019-12-11 18:58:37
问题 I'm using OleDBCommand to select some data in an Excel sheet I have. I have One column that has lists of data (column J) and every column after that either (columns K - AG) has a 1 or 0 depending on a relationship. So it's basically a graph plotted with 1 or 0. I want to use a SQL command to select every entry in column J where there is a 1 plotted in a column I choose. For example, say I want to look at the column J to K relationship. Then I would want to pull all data from J where columns J

How to make your Server as Linked Server for selected views?

天大地大妈咪最大 提交于 2019-12-11 15:16:52
问题 We have a SQL Server 2012 instance which is the database for our security system. Now we have a scenario where we want to allow another team our SQL Server to select certain records, ie we created four views for them for their requirements. But, we don't want to provide or list all our tables to them but only allow these four views to see and query in our system. As I go through many documents it's clear that we can do it through making our SQL Server as a linked server. What's the best way

Problem with OleDbConnection string - folder name contain white space

别等时光非礼了梦想. 提交于 2019-12-11 11:14:08
问题 I have problem with OleDbConnection string format. I use OleDb classes on access to Excel file. Here is method wich load excel table to dataset. public DataSet LoadExcelFileToDataSet(string file, string sheetName) { string connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + file + ";" + "Extended Properties=Excel 8.0;"; var oledbConn = new OleDbConnection(connString); try { // Open connection oledbConn.Open(); // Create OleDbCommand object and select data from worksheet Sheet1

get Database row column value with OleDbCommand

回眸只為那壹抹淺笑 提交于 2019-12-11 10:33:47
问题 I have occurred problem in getting my row value, once I read it from Database using OleDbCommand Current code: private static string TryCheckDateTime(OleDbConnection cn, string table, string colName, string dataColumn) { if (dataColumn.Contains(AllowedValues.String.ToString())) { using (OleDbCommand cmd = new OleDbCommand()) { OleDbDataReader rowItems; // Connection to Database cmd.Connection = cn; // Query script: "SELECT TOP 5 {0} FROM [DBName].[dbo].[{1}]" cmd.CommandText = string.Format