oledb

How to read a CLOB column in Oracle using OleDb?

偶尔善良 提交于 2019-12-05 07:45:16
I have created a table on an Oracle 10g database with this structure : create table myTable ( id number(32,0) primary key, myData clob ) I can insert rows in the table without any problem, but when I try to read data from the table using OleDb connection, I get an exception. Here is the code I use : using (OleDbConnection dbConnection = new OleDbConnection("ConnectionString")) { dbConnection.Open(); OleDbCommand dbCommand = dbConnection.CreateCommand(); dbCommand.CommandText = "SELECT * FROM myTable WHERE id=?"; dbCommand.Parameters.AddWithValue("ID", id); OleDbDataReader dbReader = dbCommand

System.Data.OleDb.OleDbConnectionInternal..ctor: Unspecified error

自古美人都是妖i 提交于 2019-12-05 07:14:23
After several hours (~6 hours Win7 64bit, ~24hours WinXP) of running multi-threaded (.NET Framework 3.5 SP1 WinForms) desktop application using .mdb files as backend I'm getting the following runtime error: Exception -> Unspecified error StackTrace -> at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory

C# Open DBF file

ぃ、小莉子 提交于 2019-12-05 05:52:17
I'm having a problem opening a DBF file - I need to open it, read everything and process it. I tried several solutions (ODBC/OLEDB), several connection string, but nothing worked so far. The problem is, when I execute the SQL command to get everything from the file, nothing gets returned - no rows. What's even more odd, the content of the DBF file being opened get deleted. See the code I have: public override bool OpenFile(string fileName, string subFileName = "") { OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Path.GetDirectoryName(fileName) + "

Reading Excel-file using Oledb - treating content of excel file as Text only

一世执手 提交于 2019-12-05 05:32:42
问题 I am using C# and OleDb to read data from an excel 2007 file. Connection string I am using is: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1"; Following is the code to read excel: private OleDbConnection con = null; private OleDbCommand cmd = null; private OleDbDataReader dr = null; private OleDbDataAdapter adap = null; private DataTable dt = null; private DataSet ds = null; private string query; private

Query Excel spreadsheet with C# .NET without using Jet OLE DB

不羁的心 提交于 2019-12-05 05:06:14
Is there any way to query an excel 2010 spreadsheet, without using Jet or exporting as a CSV and querying the csv file. The reason why I cannot use Jet is because the application needs to run as a web service, on Windows Server 2008 R2, with no 32 bit support - hence Jet will not work. This is a given, as WOW 64 is not installed on the target server. This thread suggests using a 32 bit proxy machine, but this is also not an option. Further info: The server is running Sharepoint 2010. Thanks, JD Yes - you can use Excel.Interop - reference it from your C# program by adding a reference to the

OleDB INSERT command error

六眼飞鱼酱① 提交于 2019-12-05 03:24:32
I have a database (i use MS ACCESS) I have this insert code, I can read data but got error when writing, I follow instruction but it didn't work here is my code OleDbConnection con = new OleDbConnection(@" provider=Microsoft.ace.Oledb.12.0; data source=\\sisc-erelim\4_Printing\VTDB\DB\VirginiTEADB2.accdb; Persist Security Info=False"); private void button1_Click(object sender, EventArgs e) { try { OleDbCommand cmd = new OleDbCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "INSERT INTO Accountstbl (Username, Password)" + "VALUES ('" + textBox1.Text + "','" + textBox2.Text + "')

How to read an .XLSX (Excel 2007) file using ADO.NET? I am finding “Could not find installable ISAM”-error

蓝咒 提交于 2019-12-05 00:37:08
问题 I need to work in .net 2.0 . So I can't use OpenXML. This is my source code and I have already Installed AccessDatabaseEngine.exe . But still getting the exception: "Could not find installable ISAM". I have also tried "Extended Properties=Excel 8.0" in the connection string. static void Main(string[] args) { DataSet dataSet = new DataSet(); OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|Data Directory|\HSC.xlsx;Extended Properties=Excel 12.0

There is insufficient system memory in resource pool 'internal'

落花浮王杯 提交于 2019-12-04 23:35:12
SQL Server 2008 Linked Server and ad-hoc INSERTs cause a rapid memory leak which eventually causes the server to become non-responsive and ends with the following error: Msg 701, Level 17, State 123, Server BRECK-PC\SQLEXPRESS, Line 2 There is insufficient system memory in resource pool 'internal' to run this query. Location: qxcntxt.cpp:1052 Expression: cref == 0 SPID: 51 Process ID: 1880 The server remains non-responsive until SQL Server is restarted. Software in use: Windows Vista Ultimate 64 bit build 6001 SP1 Microsoft SQL Server 2008 (SP1) - 10.0.2734.0 (X64) Sep 11 2009 14:30:58

Accessing Excel 2007 Binary (.xlsb) via OleDb ACE

删除回忆录丶 提交于 2019-12-04 20:43:23
问题 I found the Excel 2007 Binary format (with extension .xlsb) perfectly suitable for my needs, since it's fast to load and very compact. I deliver a bunch of reports in Excel that carry a lot of data, and those reports are actually being loaded with an IS package. So I assumed the conversion to this very format, read documentation on Access Ole DB Provider 12, where is written that xlsb is supported by this provider. I converted the files in Excel, and then when trying to change them in the

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine though Microsoft.ACE.OLEDB.12.0 is installed

狂风中的少年 提交于 2019-12-04 19:52:04
I get the following exception 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine though I have installed 'Microsoft.ACE.OLEDB.12.0' In my local dev machine I have also office 2010 What is wrong? If you system is 64 bit,Then you have to change your pool settings to allow 32 bit applications that is OLEDB. ,then this link might help. http://help.webcontrolcenter.com/KB/a1114/how-to-enable-32-bit-application-pool-iis-7-dedicatedvps.aspx Ramakrishna.p refer posts it was explained you need to install office drivers first 'Microsoft.ACE.OLEDB.12.0' provider is not registered