oledb

Problem with OleDbConnection, Excel and connection pooling

孤街醉人 提交于 2019-11-30 07:39:42
问题 So, I have the same symptoms as described in C#/ASP.NET Oledb - MS Excel read "Unspecified error", but my my answer did not seem to fix it. Even always closing the OleDBConnection and disposing of it show the same symptoms. var connectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0; data source={0}; Extended Properties=Excel 12.0;", _excelFile); using (var conn = new OleDbConnection(connectionString)) { try { DoSomething(); } finally { conn.Close(); } } Now I have found the

DataAdapter.Fill(Dataset)

落花浮王杯 提交于 2019-11-30 07:18:44
i try to get some Data from a Access Database via OleDB in a DataSet . But the DataSet is empty after the Fill() method. The same statement works and return 1 row when i trigger them manually in D*. OleDbConnection connection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Inventar.accdb"); DataSet1 DS = new DataSet1(); connection.Open(); OleDbDataAdapter DBAdapter = new OleDbDataAdapter( @"SELECT tbl_Computer.*, tbl_Besitzer.* FROM tbl_Computer INNER JOIN tbl_Besitzer ON tbl_Computer.FK_Benutzer = tbl_Besitzer.ID WHERE (((tbl_Besitzer.Vorname)='ma'));", connection);

Does Microsoft OLE DB Provider for SQL Server support TLS 1.2

自作多情 提交于 2019-11-30 07:10:47
问题 Our client recently upgraded from TLS 1.0 to TLS 1.2 and after this our software cannot connect with SQL server. It uses OLE DB provider for connecting to SQL server. Below is the error which is returned from SQL server- [DBNETLIB][ConnectionOpen SECDoClientHandshake()]SSL Security error SQL State: 08001 SQL Error Number: 18 Could not find any useful information related to whether Microsoft OLE DB Provider for SQL Server support TLS 1.2 or not. One of the links I found seems to suggest that

Why doesn't Microsoft support OLE DB connections to SQL Azure?

放肆的年华 提交于 2019-11-30 07:03:32
At the MSDN website it says, " Connecting to SQL Azure by using OLE DB is not supported. " There are other places on the web where folks report that it works fine for them after tweaking the server name in the connection string, such as here and here . Even SQL Server's Analysis Services uses OLE DB to connect to SQL Azure ! I develop a native/unmanaged application in Delphi that connects to SQL Server using ADO through the OLE DB provider for SQL Server. I'm considering adding SQL Azure support. It would be really helpful if I could reuse the majority of my code without not too much change. I

Extract OLE Object (pdf) from Access DB

会有一股神秘感。 提交于 2019-11-30 05:40:53
问题 We are upgrading/converting several old Access databases to MS-SQL. Many of these databases have OLE Object fields that store PDF files. I'm looking for a way to extract these files and store them in our SQL database. I've seen similar questions that answer how you might do this with image files (jpg, bmp, gif, etc) but I haven't found a way that works with PDF. 回答1: I finally got some code working for what I want it to do. The trick is determining what part is the OLE Header and removing it.

OLE DB Provider for ODBC Drivers Error "80004005'

南楼画角 提交于 2019-11-29 23:19:05
问题 I have to move some customer sites from a very old IIS Server to a newer one, and some sites have troubles to work in the correct way. Most of them complain about a failure called: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified. I've read on the internet that this could depend on missing rights given to the user; other sites states that a Temp folder is missing (I can't imagine that this is

Reading Excel sheet using ACE.OLEDB.12.0 with IMEX=1 not working

为君一笑 提交于 2019-11-29 22:58:50
问题 I'm using the below Connection String with ACE.OLEDB.12.0 to read data from an XLSX Spreadsheet, but the I set IMEX=1, it does not work while when I remove IMEX=1 completely, it works fine. "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Working Folder\ICDE\Ramsden 4.xlsx;Extended Properties=""Excel 12.0 xml;HDR=No;IMEX=1;""" Can anyone explain why? Because I had the impression that IMEX=1 reads all data as text, so it was more secure! Thanks JP IMEX= <0/1/2> IMEX refers to IMport EXport

'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine. (System.Data) [duplicate]

天大地大妈咪最大 提交于 2019-11-29 22:45:17
This question already has an answer here: 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine 33 answers I get this error when I try to connect to any excel through MSSQL Server Data Import i.e. SSIS package The Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine. ( System.Data ) It is not the same version I think some other patching is needed FA911 Note: I am running SQL 2016 Developer 64bit, Office 2016 64bit. I had the same issue and solved it by downloading the following: Download and install this: https://www.microsoft.com/en-us/download/details

How to upload only non-empty rows of Excel spreadsheet using oledb in C#?

陌路散爱 提交于 2019-11-29 18:30:15
问题 I am importing excel sheet to DataTable using oledb connection as below. private static DataTable UploadExcelSheet(string fileName) { DataTable uploadDataTable; using (OleDbConnection objXConn = new OleDbConnection()) { objXConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileName + ";Extended Properties=\"Excel 12.0;IMEX=1\""; objXConn.Open(); OleDbCommand objCommand = new OleDbCommand("SELECT * FROM Template$ ", objXConn); OleDbDataAdapter objDataAdapter = new

“Data type mismatch in criteria expression.” Error

喜你入骨 提交于 2019-11-29 18:06:46
I get a "Data type mismatch in criteria expression." error when running this code on one database but it works perfectly fine on another database. When trying to copy the relevent table to other database and run it from him the program fails again! using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Project { public partial class Login : Form { public Login() { InitializeComponent(); } private void Login_Load(object sender, EventArgs e) { } private void