oledb

Issue with OleDbConnection.Open when Running as a Service

We have an Nant build script that we are running through SSH (Cygwin & Open SSH) to remotely upgrade our databases. When the Nant script is launched through an SSH session, the following error is thrown when it attempts to make a database connection. However, if I log in to the server directly (using the same account as the service) an...

OleDB + Jet: Syntax Error in Join Operation

I've built a complex query for my access database and in access it works like a charm. But when I try to run the same query in my program via OleDB I get the exception "Syntax Error in Join Operation". No further info. SELECT MainTable.Main_dbID, D0.Kvp_Value AS ["Value"] FROM (MainTable INNER JOIN ( SELECT Main_dbID, Kvp_Va...

Windows Search using OLE DB SQL Fields

Hi I need to use Windows Search within my .NET application to search for certain files containing certain keywords. All of this seams easy enough using OLE DB to connect to the Windows Search data store on Windows 7. I have what I hope is a seriously easy question. I have been searching high and low for the field definitions for the SQ...

How to export a c# decimal to a OLEDB Decimal(28,9) field

I'm approaching a access 2007 database using Microsoft.ACE.OLEDB.12.0. It contains a table created using CREATE TABLE reccs(decimalField decimal(28,9)) which has to have this precision and scale. I'm adding a row using string s = "INSERT INTO [reccs]([minQuantity]) VALUES(@minQuantity)"; object o = ...; oleDbCommand = new OleDbComm...

What is difference in adodb and oledb?

What is the difference between adodb and oledb? What is the relation between these two? Where does ado.net stands in context of adodb and oledb? ...

What parameters are applicable to Microsoft.Ace.Oledb.12.0

Hi All, Where can I find a list/explanation of Extended Properties for Microsoft.ACE.Oledb.12.0 Thanks ...

fetch column names for specific table.

I want to fetch all the column names for specific table.. I am using msaccess and C# .net 2008. ...

ODS query from Excel returns spurious column names

Hello all When retriving Excel sheet Named region it returns spurious column names OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "No value given for one or more required parameters.". Msg 7320, Level 16, State 2, Line 1 Cannot execute the query "SELECT `Tbl1005`.`CUSTOMER` AS `Col1031`,`Tbl1005`...

DataTable is sorted after selecting from Excel

When i select records from excelsheet the datatable is sorted. I want the records in same sequence as excelsheet, why is the datatable sorted. OleDbCommand objCommand = new OleDbCommand("SELECT distinct * FROM [" + strSheet + "]", objXConn); OleDbDataAdapter objAdapter = new OleDbDataAdapter(objCommand); objAdapter.Fill(dtEx); ...

Exception using DateTime in a parameterized OleDbCommand

I'm trying to insert a System.DateTime into an Access database using a parameterized OleDbCommand in C#. However, it throws a Data type mismatch in criteria expression exception. Here is my code: string statement = "INSERT INTO Log (SCTID, LogDateTime, Type, Message, Visible)" + "VALUES (?, ?, ?, ?, ?);"; OleDbCommand insertComman...

How to close a DB2 cursor from OLEDB client?

I have client utility that uses OLEDB to call a DB2 stored procedure. Inside the stored a procedure a cursor is opened so my utility can read record sets. Everything works fine but after a while of calling the same procedure over and over again, DB2 eventually throws an error that is related to the cursor being left open. Is there a sql ...

How to select number from Excel file?

I use this code to load an Excel file into a datatable: public static DataTable ImportExcelFile(string connectionString) { DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb"); var listCustomers = new DataTable(); using (DbConnection connection = fa...

How to install Excel OLE DB to Windows Server 2008?

We have a web server running Windows 2008 32-bit. When we deploy a website that reads from Excel using OLE DB, we got this error The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. We don't want to install Microsoft Office on the server. Is there anything else we can do to solve this? Thanks in adv...

In VBA, how do I use ADODB to query the same file on a hard drive at the same time?

I have some VBA code that looks like this and the aim is to query a csv file and bring back some records. However, I want to be able to query the same file (which sits on a network drive) at the same time from two computers. I tried using the readOnly mode but it still doesn't work. Please help? Dim cnt_string As String cnt_strin...

OleDB Read Excel decimal value

I am using OleDB Ace 12 to read an Excel (xslx) sheet containing a column with decimal values. When I open the Excel sheet on my PC a decimal value is correctly formatted as 1.850,50 (NLD culture with comma as decimal separator) When I'm reading out the Excel sheet using OleDB (C#4.0), the string value of this field is always 1,850.50 (...

Quick ways to test OLE DB Connection String

Hi all: For debugging purpose I'd like to know ways to test OLE DB connection string quickly. I've found this free software, it works on my machine, tested successfully. Is there a even quicker way to do so, maybe from command line on Windows? Because most of the time, it is the client rather than me that would do this task, so I pref...

Error on only Azure - 'Microsoft.ACE.OleDb.12.0' provider is not registered on the local machine.

I am working with MS Excel files in my web application built in Azure environment. I never run into following error when I am trying to access the excel file on my development fabric. But once I deploy to Azure in cloud, I get this error message. The 'Microsoft.ACE.OleDb.12.0' provider is not registered on the local machine. I was und...

How Do I read an Excel 2007 spreadsheet with more than 65535 rows?

Here's what my connection string looks like.. m_conn = new OleDbConnection(String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=" + (char)34 + "Excel 12.0;HDR=YES" + (char)34, m_fileName)); When I do a select, I only get 65535 rows back but I know the excel spreadsheet has at least 100,000. How Do I re...

Do I need to have Excel installed to query spreadsheets using an OleDB Provider?

I am working on some software that uses an OleDB to open a .xls file, query some data, and fill a dataset with the results. I am now looking at using this software on systems that do not have Excel. Will my software still be able to read the spreadsheets? This xls file contains 1000s of configuration settings that my software uses. I...

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

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 D...