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
7
votes
3 answers

Can we add Reference of 'Microsoft.ACE.Oledb.12.0.dll' to project

I am getting error "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine." on my testing servers. So My Question is : i) Can i add reference for "'Microsoft.ACE.Oledb.12.0.dll'" to project it self? ii) Is it safe? iii)…
Avinash
  • 173
  • 1
  • 4
  • 17
7
votes
4 answers

How to get sheetname of the uploaded excel file using C#?

I would like to get the sheet name of the uploaded excel file using C# code. The file may be in .xls or .xlsx format. The Code I have used is as follows: protected void btnGenerateCSV_Click(object sender, EventArgs e) { string…
prabu R
  • 2,099
  • 12
  • 32
  • 41
7
votes
4 answers

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done

I am running following code /*Fetchinch Last CustID from custMaster*/ int ID = 0; try { con.Open(); da = new OleDbDataAdapter("select max(Id) from custMaster",con); DataSet ds = new DataSet(); da.Fill(ds); for(int…
Freelancer
  • 9,008
  • 7
  • 42
  • 81
6
votes
8 answers

Delphi with SQL Server: OLEDB vs. Native Client drivers

I have been told that SQL Native Client is supposed to be faster than the OLEDB drivers. So I put together a utility to do a load-test between the two - and am getting mixed results. Sometimes one is faster, sometimes the other is, no matter what…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
6
votes
1 answer

OleDbConnection() opens an Excel file in any open Excel window. But does not if there isnt a window open

I am writing an application which uses an OleDbAdapter to access information in an Excel file. When I try to create a connection to the Excel file if the user has another (unrelated) Excel file open on their desktop then the file being connected to…
Scott
  • 61
  • 1
6
votes
8 answers

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…
Maciej
  • 10,423
  • 17
  • 64
  • 97
6
votes
4 answers

Inserting a date/time value in Access using an OleDbParameter

I'm trying to do an insert in oledb(ms access database) the field called objectdate is date/time the code i use to add the parameter is this, but i'm getting error. OleDbParameter objectdate = new OleDbParameter("@objectdate", OleDbType.DBDate); …
robert
  • 321
  • 2
  • 9
  • 20
6
votes
1 answer

Cannot connect to SQL Azure using a Linked Server

I've been following this article here: http://blogs.msdn.com/b/sqlcat/archive/2011/03/08/linked-servers-to-sql-azure.aspx on how to setup a Linked Server from SQL Server 2008 R2 to an SQL Azure instance. I am using SQL Native Client 10.0 as the…
Luke Merrett
  • 5,724
  • 8
  • 38
  • 70
6
votes
5 answers

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…
user84748
  • 103
  • 2
  • 6
6
votes
1 answer

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

I have installed the 'Microsoft Access Database Engine 2010 Redistributable' as described in the blog entry http://danielcai.blogspot.com/2011/02/solution-run-jet-database-engine-on-64.html and it works in my windows-forms application. I now want…
Jurjen
  • 764
  • 1
  • 10
  • 24
6
votes
2 answers

SSIS: Variable from SQL to Data Flow Task

Pretty new to BI and SQL in general, but a few months ago I didn't even know what a model is and now here I am...trying to build a package that runs daily. Currently running this is Excel via PowerQuery but because the data is so much, I have to…
donDT
  • 63
  • 7
6
votes
1 answer

OleDB Connection string for reading an Excel file exclusively opened by other user

Can anyone tell me OleDB Connection string to be used for just reading an Excel file exclusively opened by other user? I tried following connection string which did not work for me:- "Provider=Microsoft.Jet.OLEDB.4.0;Data…
Kushal Waikar
  • 2,976
  • 5
  • 26
  • 31
6
votes
2 answers

How to make SSIS package dynamically choose the desired connection manager?

I have an SSIS package with a OLE DB connection manager to 'SQL Server 1', as well as flat file managers that come from the D disk of the local machine. The package basically retrieves data from the D disk of the machine I am using, and through a…
BI_noob
  • 71
  • 1
  • 1
  • 4
6
votes
4 answers

Query Excel spreadsheet with C# .NET without using Jet OLE DB

Is there any way to query an excel 2010 spreadsheet, without using Jet or exporting as a CSV and querying the csv file. The reason why I cannot use Jet is because the application needs to run as a web service, on Windows Server 2008 R2, with no 32…
Darbio
  • 11,286
  • 12
  • 60
  • 100
6
votes
3 answers

System.Data.OleDb.OleDbConnectionInternal..ctor: Unspecified error

After several hours (~6 hours Win7 64bit, ~24hours WinXP) of running multi-threaded (.NET Framework 3.5 SP1 WinForms) desktop application using .mdb files as backend I'm getting the following runtime error: Exception -> Unspecified error StackTrace…
ShamilS
  • 1,410
  • 2
  • 20
  • 40