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
9
votes
1 answer

Requested operation requires an OLE DB Session object... - Connecting Excel to SQL server via ADO

I'm attempting to take Excel 2003 and connect it to SQL Server 2000 to run a few dynamicly generated SQL Queries which ultimately filling certain cells. I'm attempting to do this via VBA via ADO (I've tried 2.8 to 2.0) but I'm getting an error…
Frank V
  • 25,141
  • 34
  • 106
  • 144
9
votes
1 answer

Microsoft.Jet.OLEDB.4.0 - Provider can not be found or it may not be installed

I have created an Excel Macro in which I have used Microsoft.Jet.OLEDB.4.0 to fire query on Excel work sheets. It's working perfect on my machine but my client is facing issue with it. (see the attached screen print) Here are details for my…
TechGeek
  • 2,172
  • 15
  • 42
  • 69
9
votes
2 answers

Dapper & MS Access - Read works, Write doesn't

Let's start by getting this out of the way: I'm stuck using an MS Access DB and I can't change it. This works fine: using (OleDbConnection conn = ConnectionHelper.GetConnection()) { conn.Open(); var results = conn.Query( "select…
Trev
  • 1,358
  • 3
  • 16
  • 28
9
votes
2 answers

Acquire Connection and Strange behavior when using Execute Package Task

I've a Master package where in I'm calling several packages using Execute package task. Both child and master packages don't have any configuration and are connecting OLEDB (SQL Server) using hardcoded SQL authentication connections in the…
user46795
  • 2,643
  • 3
  • 25
  • 31
9
votes
3 answers

Disable/Flush OleDbConnection Cache

I've been fighting with OleDbConnection for a while now trying to get it to not cache. Basically I am accessing a shared Access database, which is being written to from another application, and then I'm reading back values (having checked that it is…
Rudi Visser
  • 21,350
  • 5
  • 71
  • 97
8
votes
2 answers

Reading Excel InterMixed DataType Without Modifying Registry Key

I am trying to use C# to read excel file which has intermixed datatype. Below is my connection string var path = //xls location var MyConnection = new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source='" + path + "';Extended…
rofans91
  • 2,970
  • 11
  • 45
  • 60
8
votes
1 answer

Ms Access: Record(s) cannot be read; no read permission on [table]

i wrote script for downloading mdb files and reading them due OLEDB provider. All works fine, but if i try to read from table, it throws an exception: Ms Access: Record(s) cannot be read; no read permission on tblMytable var cmd = new…
Jan Remunda
  • 7,840
  • 8
  • 51
  • 60
8
votes
7 answers

Writing into excel file with OLEDB

Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results =…
Danielb
  • 1,608
  • 5
  • 24
  • 34
8
votes
4 answers

VBA - Remove Password from OLEDB Connection String

I have an excel file that contains a series of OLEDB connections leveraged by several pivot tables. I would like to create a VBA function that removes all password from that several connection string as the file is closed(so that the users password…
David Rogers
  • 2,601
  • 4
  • 39
  • 84
8
votes
2 answers

Any references/manuals on SQL in EXCEL with Microsoft OLE DB Provider for Jet 4.0?

is there any references/manuals on SQL syntax in EXCEL connected with Microsoft OLE DB Provider for Jet 4.0 ? For example, how do I write constants of type date? What keywords/functions/clauses are available?
deerchao
  • 10,454
  • 9
  • 55
  • 60
8
votes
3 answers

Check if a database cell is empty first

I am accessing an MS Access 2007 database through C#, and I keep getting an exception whenever I try to read an empty cell. Specifically, I am trying to read a "Date/Time" cell that may or may not be empty. I am using OLE DB, and have filled a…
Eric
  • 2,098
  • 4
  • 30
  • 44
8
votes
1 answer

Accessing Excel 2007 Binary (.xlsb) via OleDb ACE

I found the Excel 2007 Binary format (with extension .xlsb) perfectly suitable for my needs, since it's fast to load and very compact. I deliver a bunch of reports in Excel that carry a lot of data, and those reports are actually being loaded…
Rafael
8
votes
6 answers

1GB of Data From MySQL to MS Access

The Situation: I am creating an automated task which queries MySQL (through ODBC) and inserts the result set to a MS Access Database (.mdb) using OLEDB. The Code: OleDbConnection accCon = new OleDbConnection(); OdbcCommand mySQLCon = new…
Masoud
  • 157
  • 9
8
votes
1 answer

How to find which OLE provider is available for SQL Server?

I try to access an Excel file in SSMS. After searching the internet, I could not get it working. Here is what I did: My environment: Windows 7(64bit) SP 1, Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64) Office 2010 Pro Plus with Access…
KentZhou
  • 24,805
  • 41
  • 134
  • 200
8
votes
4 answers

Jet Engine - 255 character truncation

I'm needing to import an Excel spreadsheet into my program and have the following code: string connectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;IMEX=1;HDR=NO;""",…
Graeme
  • 1,657
  • 5
  • 28
  • 46