oledb

Preferred Method to Catch Specific OleDB Error

Ok - I have a situation in which I must execute a dynamically built stored procedure against tables that may, or may not be in the database. The data retrieved is then shunted to a VB.Net backed ASP based report page. By design, if the tables are not present in the database, the relevant data is automatically hidden on the report page....

Sql Server OLEDB provider error. The provider ran out of memory error.

Sorry for my english :). I have a windows service. Service report some excel files weekly. But ı got a"OLE DB provider 'SQLOLEDB' reported an error. The provider ran out of memory" Ole Db error. Service use SQl Server 8.00.194 and it link another SQL Server. I do not know why ı receive this error. Thanks for help. ...

best database design for city zip & state tables

My application will need to reference addresses. Street info will be stored with my main objects but the rest needs to be stored seperately to reduce redundancy. How should I store/retrieve ZIPs, cities and states? Here are some of my ideas. single table solution (cant do relationships) [locations] locationID locationParent (FK for loc...

C# Connecting to mysql using linq VS OleDB

Hi, I'm developing a web application with ASP.net & C# and it needs to connect to mysql database. I'm not sure if I should use linq or OleDB to connect to mysql!!! can you give me some advices about that? ...

Is there a way to use OLE DB Provider for Jet on an unsaved Excel workbook?

I am working with the Microsoft OLE DB Provider for Jet to execute queries on spreadsheets in Excel using VBA. Is there a way to execute the following code on an unsaved workbook? For example, ActiveWorkbook.FullName returns "Book1" if the workbook has never been saved. In that case the Data Source will assume the path is the active dir...

Insert row with BLOB column with MSDASQL

I have been struggling with this issue for a week, still can't get it working. The situation is: I have a table with two columns: PK: CHAR(4) F1: BLOB I can get the Select and Upate working, but don't know how to get INSERT working. The INSERT action should happen in following query parameter binding way: insert into table (pk, f1)...

Reading Foxpro database date field using PHP

I've wrote a PHP script to export a Foxpro database to other formats by using ADODB (http://phplens.com/lens/adodb) library to access Foxpro OLE DB provider. Everything worked fine except the date fields are mangled and become like these: 11/17-/2-00 3/4/-20-08 By comparing to actual data I can guess that it is probably in the forma...

Excel through OleDb shows numbers differently...depending on whether spreadsheet is open!?

I'm opening an Excel worksheet into a DataTable using OleDb like this: string select = string.Format("SELECT * FROM [{0}$]", worksheetName); using (var con = new OleDbConnection(connectionString)) using (var adapter = new OleDbDataAdapter(select, con)) { con.Open(); var dt = new DataTable(); adapter.Fill(dt); con.Close()...

Anyone have experience integrating with MYOB?

Looking to integrate a web application with MYOB. There's not much in terms of documentation out there. I've found a couple of companies that provide middleware, but nothing promising. Just thought I'd see if anyone else out there has had experience with this and might be able to save me a bit of time. Cheers ...

Does the Microsoft SQL Server native client support IDBAsynchNotify?

I'm working on some OLE DB code that runs queries on MS SQL Server via ICommand::Execute. I'm converting this code to operate asynchronously by setting the DBPROPVAL_ASYNCH_INITIALIZE property on the command before executing. I'd prefer to register a IDBAsynchNotify sink so that my code can be notified of events, as opposed to polling o...

What is the alternative to OleDB data providers?

I have to import data from a variety of sources: text delimited with comma, tab, custom delimiter, Excel files, SQL Server and Oracle. The logical choice seemed to be an OleDB Connection, that would allow me treat any input as a DataSet and have very few implementation differences to worry about. Problem is that good ol' "Microsoft.Jet....

Programmatically finding an Excel file's Excel version.

Hi All, I'm using an OleDbConnection to connect to a spreadsheet from a C# program. One of the parameters in the connection string is the Excel version. "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Book1.xls;Extended Properties="Excel 8.0;HDR=YES" Given the path of an Excel file how can I find out which Excel format version it us...

FoxPro oledb driver wont allow writes accross servers (WCF)

Ok we have a WCF service running on one machine on IIS6 + server2003 r2 this service needs to write and read to/from a fox pro database that is located on another machine on the network - windows 2003 (probably r2). After playing with permissions (both on the fox pro file and impersonation in WCF) we have finally managed to read from i...

Creating an Excel Sheet with ADO.NET (OleDb) --> What DataTypes are Supported?

Hi I try to create an Excel (2003) Sheet with ADO.NET (OleDb). I was able to create the Sheet with an OleDbCommand: var cnnString = "Provider=Microsoft.Jet.OLEDB.4.0;..."; var cnn = new OleDbConnection(cnnString); var cmd = cnn.CreateCommand(); cnn.Open(); cmd.CommandText = "CREATE TABLE MySheet (ID char(255), Field1 char(255))"; cmd....

SSIS: Get Excel file's sheets programatically

My app generates SSIS packages for importing data from Excel files. This is done programatically, using C# . Before the package is generated, there's a setup step, in which I allow the user to select, from a template Excel file, the sheet name and columns to import. (Basically what you would normally do if you were manually building the...

Reading image from Access - parameter not valid

Hello. I have simple database in Access .mdb file, but I don't know how to deal with: "parameter not valid" exception when Im creating Image from stream. I'v read that I need to strip 78 bytes offset (from here) but I still get a "parameter not valid" error when I call FromStream, even after stripping off the first 78 bytes. ...

Multiple-step OLE DB operation generated errors

I am running a simple FillSchema from a Netezza data source dss = new DataSet(); ad = new OleDbDataAdapter(cmd); ad.SelectCommand = new OleDbCommand("SELECT * FROM " + objTable.name); ad.SelectCommand.Connection = cn; ad.FillSchema(dss, SchemaType.Source); I get the following error: System.Data.OleDb.OleDbException: Multiple-step OLE...

Issues reading CSV file using OLEDB when filenamen have period

Issues reading CSV file using OLEDB when filenamen have period. I have a code in C# that reads CSV File using OleDBProvider. It works perfect with filenames in regular format such as Budget.csv but failed when i renamed the file into Budget.DKK.csv or Budget.USD.csv I throws this exception: he Microsoft Jet database engine could not fi...

what are the OleDbTypes associated with Oracle Number and varchar2 when calling a function

I'm trying to map OleDb parameters to an Oracle Function. I was able to do this using the System.Data.Oracle namespace but then found that this is depricated, so I thought i would re-write it as OldDb to avoid installing the Oracle Provider. I have defined the following oracle function as an example: create function GetImagePath (AIRS...

SQL Server Linked Server to Microsoft Access

Hello all, I have tried to make use of linked servers in SQL Server 2008 by doing the following to access a Microsoft Access 2003 Table. EXEC sp_addlinkedserver access1t, 'OLE DB Provider for Jet', 'Microsoft.Jet.OLEDB.4.0', 'C:\tester.mdb' EXEC sp_addlinkedsrvlogin access1t, FALSE, Null, Admin, Null GO CREATE VIEW TI001APCE1265 AS SEL...