oledb

Best way to check OleDbConnection state

Apparently (MSDN) sometimes OleDbConnection.ResetState() does nothing, so even if the connection fails OleDbConnection.State will still be set to Open. I am looking for best workaround for this, so that when I check connection state I can avoid raising exceptions (as long as connection hasn't failed between the last check and usage attem...

How do you "parameterize" DB2/iSeries file in Reporting Services dataset?

This is a sample query for a dataset in my Microsoft Reporting Services Report (.rdl) SELECT ORDNO FROM INTERFACET.DOPPRMAH This is connecting to the iSeries via the OLE DB driver from IBM. How do I "parameterize" the 'INTERFACET' part. ...

Why does invoking my UPDATE query in an Access database via OleDb not work?

Update 2: I solved this, see my answer. I am invoking queries in a Microsoft Access database from C# using OleDb, but I can't get my update queries to work. No error is thrown, but updates are not persisted in the database. Can anyone shed any light on this? SQL query in the database: UPDATE tableName SET tableName.LastPolledD...

Column limitation on CSV using Microsoft Jet OLEDB

Hi, I'm importing data from a CSV that contains approx 350 columns. This CSV import is fixed and I have absolutely no control over it. If I attempt to open the CSV in Excel 2003, it only partially loads due to the column limit of 255 (IV). When I load the CSV into a DataSet using OleDb and Microsoft.Jet.OLEDB.4.0 it also only shows 25...

How to use GetOleDbSchemaTable method on a long name dbf file

As part of a project I'm working on in C# I need to read in a .dbf file. The first thing I want to do is to get the schema table from the file. I have code that works as long as the filename (without the extension) is not longer than 8 characters. For example, let's say I have a file named MyLongFilename.dbf. The following code does not...

OLEDB error:

Getting this error, C++/OLEDB code: Data type 0x22 is a deprecated large object, or LOB, but is marked as output parameter. Deprecated types are not supported as output parameters. Use current large object types instead. ...

OLEDB connection to Access database using DSN

Hai i want oledb connection using Dsn. I used the following code 'Dsn Create dbRegBase.RegisterDatabase("GEMINI", "Microsoft Access Driver (*.mdb)", True,DBQ=D:\Gemini\GEMINI\database\paints_01_2008-2009.mdb Description=Greenchip Technologies ODBC Database File Path OemToAnsi=No UID=admin PWD=XXXXXX conection code Provider=Microsof...

Excel DateTime being returned as DBNull

I have some Excel file reading code that uses the OLEDB (Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=Excel 8.0;) which works well but I keep encountering an issue whereby certain dates are returned as DBNull. In the original XLS document, the format of dates that work (en-GB locale) are: "02/04/2009 17:00:00" ...

C# Access Database In use or Permission Failure

Hello, I'm using Access 2007 and C# to learn Databases. So far it's been rough but I've been able to handle things relatively well. What I need to do though is to query a my database table Accounts for the Amount of money a user has based on their pin. I've placed a button on the Windows Form I am using that will query the database on c...

dat idx files database recognition

Hi, I have some .dat and .idx files and one .sup file in a directory , and i would like to know if there is any tool or .net programming tecnique to find out what type of database is? I dont know if this could help, but if i open one .dat file as text file, i get this: 0~0904021846460509040218464605>ÀÀX2Ü And the common part of all t...

How to get rid of multiple columns in a database?

I'm creating an Access DB for use in an C# application at school. I've not had much experience working with DB's so if this sounds stupid just ignore it. I want the user to be able to select all the classes that a certain student has had in our IT department. We have about 30 in all and the maximum that a person can take in 4 years of hi...

How to enable OLEDB resource pooling in a Delphi 7 app

What needs to be done to enable pooling in a Delphi 7 app? My connection string is: Provider=SQLOLEDB.1;Initial Catalog=%s;Data Source=%s;Password=%s;User ID=%s;OLE Db Services=-1 I can tell that connection pooling is not being achieved by looking at the SQLServer:GeneralStatistics UserConnections performance counter - it fluctuates w...

What's the smallest footprint necessary to use an unmanaged Oracle provider?

I'm working on an application written in .NET. We are currently using ODP.NET 11's xcopy deployment for all of our .NET operations and everything is peachy - we can run on machines with no Oracle client previously installed. Peachy, that is, until we came to the part of the application which depends on a library written in COM, which o...

DBF Large Char Field...

I have a database file that I beleive was created with Clipper but can't say for sure (I have .ntx files for indexes which I understand is what Clipper uses). I am trying to create a C# application that will read this database using the System.Data.OleDB namespace. For the most part I can sucessfully read the contents of the tables the...

OLEDB, Writing Excel cell without leading apostrophe

I'm writing to Excel file using OLEDB (C#). What I need is just RAW data format. I've noticed all cells (headers and values) are prefixed by apostrophe (') Is it a way to avoid adding them in all text cells? Here is my connection string: string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";Exten...

Excel Prefixcharacter in C# with OLEDB causing "Data type mismatch in criteria expression" error on UPDATE

When updating an Excel file using OLEDB from C# I get the error "Data type mismatch in criteria expression" if the original file has a hidden PrefixCharacter (apostrophe in my case). If I remove the apostrophe from the cells in the original file, my application works as expected and the data is updated without any errors. Any suggestio...

Feed java with characters/string/bytestream from a c# class

I want to have a java app running, using a function/method (with as little delay as possible I hope!) in a c# class... The c# function takes a string from the java app, and returns a string.. Had to do it in c# to make a OleDbConnection in windows.. Thanks :) ...

SQL Server 2005 Connection Problems With Mirrored Database

The setup is as follows: A C++ client connects via OLEDB/SQL Native Client to a SQL Server 2005 database located on another machine. The server is setup with mirroring (automatic failover) with a synchronized server located on yet another server and a witness server on another server. Occassionally (once every couple of days), our ...

Vista x64, gadget development, OLEDB problem: "provider cannot be found"

Hello, I'm developing a Vista gadget. The gadget is working with local .mdb database, OLEDB used. The code is following: var cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + getDbFilePath() + ";Persist Security Info=False;"; var connection = new ActiveXObject("ADODB.Connection"); connection.ConnectionString = cs; It works unde...

C# OleDataAdapter

I have an Access Db that I load into a DataTable via DataAdapter.Fill, the table has no unique ids much like the following: 1 z 2 a 3 z 3 f 5 y The problem arise when writing the db back out, the order is incorrect; that is, we get row order 1, 2, 5, 3, 3. Any ideas? ...