oledb

Scientific notation when importing from Excel in .Net

Hi, I have a C#/.Net job that imports data from Excel and then processes it. Our client drops off the files and we process them (important because I don't have any control over the original file). I use the OleDb library to fill up a dataset (I hate writing that code. Seriously, is there any code that a .Net developer dreads writing m...

CSV access via ADO.NET in 64-bit?

Hi, In a 32-bit .NET app, I can use this (OLEDB) connection string to connect to a CSV file via ADO.NET: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\foo;" or this one (ODBC): "Driver={{Microsoft Text Driver (*.txt; *.csv)}};Dbq=c:\foo" However there apparently arent 64-bit versions of either the OLEDB Jet drivers or the ODBC te...

Excel, OleDb, and Leading zeros

I have a process that using OleDb reads data from an excel file into a DataSet. Everything was working well until I started to see data with leading 0's in it. The text is formatted as General or Text. I have set IMEX=1 in the OleDb connection, yet I still get a null value in the dataset for each entry with a leading 0. Does anyone k...

Most Efficient way to access schema with ODBC and OleDB

I am making a DAL template with C# and I am wondering what is the most efficient way to access schema information with ODBC and OleDB. I need the columns, column types, and primary key information. thanks ...

When inserting rows into MS Access from c# using TransactionLevel.ReadUncommitted from a prepared statement, the ordering seems off

I have some code in c# that is writing information (row by row) into an access database using prepared statements. I am using OleDb, and a TransactionLevel.ReadUncommitted because sometimes I need to look at the data before committing it. The problem seems to be that on 1 out of 7 different tables, the ordering that I retrieve the reco...

DSN-less ODBC connect string for legacy Sybase Adaptive Server Anywhere

This is a failed response to this article: Sybase, VB and ADO I just did a VB6 project connecting to a legacy ASA 7 database. After failing to use ASAProv OLEDB provider altogether (for one reason or another) and much research, here is the connect string for OLEDB Provider for ODBC shim for a DSN-less ODBC driver connection: Provider=M...

C#/ASP.NET Oledb - MS Excel read "Unspecified error"

We have a C#/ASP.NET (2.0) application running on IIS 6 on Windows Server 2003 Enterprise Edition. This application reads Excel files using OleDb, but there are instances when we get an "Unspecified Error" exception thrown from within the application. The file is stored in the temporary directory by our file upload code before opening...

What are the pros and cons of OleDB versus SQLClient?

Some context: one of the systems I'm working on is a .net 2.0 web application. VB.net for the front end, and SQL Server 2005 for the backend. For a variety of reasons that have been lost to time, the original designer decided to use the .Net OleDB connection rather than the SQLClient connection. After a few years of development, this ...

Using OLDB, can we unlock a worksheet and write data ??

Using OLDB, can we unlock a worksheet and write data and lock it back?? ...

Excel Expert: need a good solution to fill some data into a complex excel sheet

I am stuck with a problem The Requirement is that, there a complex Excel file(XLS) that is used as template; it has Macros and all the worksheets are either locked or hidden. When the user clicks to download it, the follows operation occurs Unlock a particular worksheet, fill some data @ certain cells and then lock it back. Unhide a w...

Problem using OLEDB driver in SQL Server CLR procedure

Hi, we are trying to create C# CLR Stored Procedure on a SQL Server 2005 machine. The C# code connects to an external datasource via an OLEDB driver to get a datatable. It has been tested on a separate console application, and it runs without problems. (The OLEDEB Driver is a proprietary driver connecting to a proprietary DB...) On SQL...

Enterprise Library Database.ExecuteNonQuery hidden performance issues (Connecting to IBM iSeries)

I was wondering what were the hidden performance implications of using the Database object in the Enterprise Library. I have an OleDbCommand (type=stored procedue) that is calling an IBM iSeries stored procedure that is taking anywhere from 1.5 to 4.5 minutes to complete. If I manually run the sproc using the iSeries tools and similar p...

How to access various databases using OLE DB with minimum installation

Hi, Our reporting tool needs to access the database and get information from it. The tool uses Crystal Reports. The database can be one of SQL Server, Oracle, Sybase and Postgres. Currently, we install the database client with the report tool installation. We would like to avoid this client installation due to licensing issues and user p...

How do I use OLE-DB to access a dbf file in an COM/C++ ATL application?

I need to access the data contained in a dbf file in COM/C++ application (created via ATL). How would I do that? I've been reading tons of msdn articles very instructive about the OLE-DB provider-consumer model. However, what I need now is a quick tutorial or code sample. Note: I am by no means no expert in COM/ATL programming :) Than...

Looking for OLE DB API

that works like: OCIAttrGet (...OCI_ATTR_PARAM_COUNT ..) ie. I am trying to validate if the number of input arguments to a stored procedure before making the call. Thanks in advance ...

SSIS output parameters and XML

It seems that when using the OLE DB Command within SSIS problems occur when handling stored procedures that return xml: view bug description I have to use a procedure that is built in such a way and get hold of the xml even if it is just as a string value. Does anybody know of a workaround to the bug linked above that doesn't involve ch...

OleDbDataAdapter Update question

Hello! I have a DataTable with a lot of rows (Over a hundred million) and am writing an application that needs to insert into that table. I will be using OleDbDataAdapter for the job and I am puzzled whats the best way to do this. I only need to insert into this enormous table, however I don't want to hard code the insert statement int...

Benefits of using sqlclient data provider with sql server 2005 over oledb data provider

hi all, Recently I think of shifting from oledb data provider to sqlclient as I am using sql server 2005 express edition as my app's backend which contain millions of records.. Can anybody give me concrete reasons for the same please reply sooon ...

Writing custom Insert/Update command for OleDbDataAdapter

Hello! I am using OleDbDataAdapter to fill a table in the DataSet. The problem is that select sql statement is very complex (using left joins to get data from numerous tables) and OleDbCommandBuilder can't write an insert/update statement for me. I was wondering what is the best course of action here? There aren't that many columns in ...

Custom writing OleDbCommand commands.

Hello! I have (another) question about writing OleDbCommand's. I have a complex select command (includes several left joins) and OleDbCommandBuilder is unable to generate update commands for me. I can't seem to grasp the magic behind writing update commands. I know the structure of the SQL update statement, however I am a bit puzzled a...