Questions tagged [oledb]

OLE DB (Object Linking and Embedding, Database, sometimes written as OLEDB or OLE-DB) is an API designed by Microsoft for accessing data from a variety of sources in a uniform manner.

It is a set of interfaces implemented using the Component Object Model (COM); it is otherwise unrelated to OLE. It was designed as a higher-level replacement for, and successor to, ODBC, extending its feature set to support a wider variety of non-relational databases, such as object databases and spreadsheets that do not necessarily implement SQL.

OLE DB separates the data store from the application that needs access to it through a set of abstractions that include the datasource, session, command and rowsets. This was done because different applications need access to different types and sources of data and do not necessarily want to know how to access functionality with technology-specific methods. OLE DB is conceptually divided into consumers and providers. The consumers are the applications that need access to the data, and the provider is the software component that implements the interface and therefore provides the data to the consumer. OLE DB is part of the Microsoft Data Access Components (MDAC) stack. MDAC is a group of Microsoft technologies that interact together as a framework that allows programmers a uniform and comprehensive way of developing applications for accessing almost any data store. OLE DB providers can be created to access such simple data stores as a text file and spreadsheet, through to such complex databases as Oracle, SQL Server and Sybase ASE. It can also provide access to hierarchical datastores such as email systems.

However, because different data store technologies can have different capabilities, OLE DB providers may not implement every possible interface available to OLE DB. The capabilities that are available are implemented through the use of COM objects - an OLE DB provider will map the data store technologies functionality to a particular COM interface. Microsoft describes the availability of an interface as "provider-specific," as it may not be applicable depending on the database technology involved. Note also that providers may augment the capabilities of a data store - these capabilities are known as services in Microsoft parlance.

http://en.wikipedia.org/wiki/OLE_DB

4441 questions
14
votes
5 answers

How to check a Cell contains formula or not in Excel through oledb reader or excel library, excel datareader or NPOI etc (Except Interop)?

How to check a Cell contains formula or not in Excel through oledb reader ? System.Data.OleDb.OleDbConnection conn2 = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source = " + strFileName + "; Extended Properties =…
LuckyS
  • 553
  • 5
  • 17
14
votes
4 answers

Passing query parameters in Dapper using OleDb

This query produces an error No value given for one or more required parameters: using (var conn = new OleDbConnection("Provider=...")) { conn.Open(); var result = conn.Query( "select code, name from mytable where id = ? order by name", …
Endy Tjahjono
  • 24,120
  • 23
  • 83
  • 123
13
votes
2 answers

OLEDB connection in R

Does anyone know of any way to connect to an OLEDB data source directly in R? I've tried google, CRAN and rseek with no luck whatsoever.
Tommy O'Dell
  • 7,019
  • 13
  • 56
  • 69
13
votes
3 answers

SEHException on OleDb connection open

I'm developing a small application that will simplify logging, it does so by adding some inputs to an MS Access database through OleDB. let private conn = new OleDbConnection(connectionString) let private submitCmd date wins = let cmd = new…
Overly Excessive
  • 2,095
  • 16
  • 31
13
votes
4 answers

How do I query raw data from a Proficy Historian?

How can I retrieve raw time-series data from a Proficy Historian/iHistorian? Ideally, I would ask for data for a particular tag between two dates.
Michael Haren
  • 105,752
  • 40
  • 168
  • 205
13
votes
4 answers

DTS_E_OLEDBERROR. Error code: 0x80004005.Difference between SQl Native client and oledb provider for sql server

There was a communication link error while I was using SQL Server Native Client 10 in an SSIS Data Flow component. Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. …
user1254579
  • 3,901
  • 21
  • 65
  • 104
12
votes
2 answers

Readonly connection string to an access database

I'm trying to connect to an Access database file using a System.Data.OleDb.OleDbConnection. I need to connect in readonly mode because another application uses it at the same time. I can connect to the database in read/write no problem but can't…
Smiffy
  • 361
  • 1
  • 5
  • 12
12
votes
2 answers

Trying to insert DateTime.Now into Date/Time field gives "Data type mismatch" error

If I try to write a datetime to a record in an MS-Access database the easy way, like this cmd.CommandText = "INSERT INTO [table] ([date]) VALUES (?)"; cmd.Parameters.AddWithValue("?", DateTime.Now); I get an exception saying "Data type mismatch in…
Mr Lister
  • 45,515
  • 15
  • 108
  • 150
12
votes
6 answers

Microsoft.ACE.OLEDB.12.0 Provider can no longer open .mdb under Windows 8

I have an x64 application which uses Microsoft.ACE.OLEDB.12.0 provider to read an MS Access Database on Windows 7 (x64) and it works fine (Office 2010 installed). The same application running under Windows 8 with Office 2013 installed, fails with a…
Craig D
  • 487
  • 1
  • 5
  • 17
12
votes
6 answers

The Microsoft Jet database engine could not find the object 'Sheet1$'

I'm attempting to read a spreadsheet file called Book1.xls which contains a worksheet called Sheet1 However I'm getting the following error: The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and…
Curtis
  • 101,612
  • 66
  • 270
  • 352
11
votes
4 answers

DataAdapter.Fill(Dataset)

i try to get some Data from a Access Database via OleDB in a DataSet. But the DataSet is empty after the Fill() method. The same statement works and return 1 row when i trigger them manually in D*. OleDbConnection connection = new…
Marcus
  • 757
  • 3
  • 9
  • 15
11
votes
10 answers

Accessing Excel Spreadsheet with C# occasionally returns blank value for some cells

I need to access an excel spreadsheet and insert the data from the spreadsheet into a SQL Database. However the Primary Keys are mixed, most are numeric and some are alpha-numeric. The problem I have is that when the numeric and alpha-numeric Keys…
Aidan Host
11
votes
0 answers

Object or Provider is not able to perform the requested operation

I am trying to run the classic asp application which uses RDS (Remote data service) on Windows Server 2008 Following is the code written in…
RemS
  • 272
  • 1
  • 9
11
votes
2 answers

OleDbParameters and Parameter Names

I have an SQL statement that I'm executing through OleDb, the statement is something like this: INSERT INTO mytable (name, dept) VALUES (@name, @dept); I'm adding parameters to the OleDbCommand like this: OleDbCommand Command = new…
Gaz
  • 3,855
  • 6
  • 28
  • 33
11
votes
1 answer

Loading Access DB Table to Datatable

I have a database in .ACCDB format with some tables. I'm successfully loading it into an OleDbDataReader with the following code: string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;data source=C:\\marcelo.accdb"; OleDbConnection conn =…
Marcelo
  • 3,371
  • 10
  • 45
  • 76