Questions tagged [oledbdataadapter]

OleDbDataAdapter is a part of the ADO.NET Data Provider and it resides in the System.Data.OleDb namespace.

OleDbDataAdapter provides the communication between the Dataset and the OleDb Data Sources. We can use OleDbDataAdapter Object in combination with Dataset Object.

The OleDbDataAdapter Object and DataSet objects are combined to perform both Data Access and Data Manipulation operations in the OleDb Data Sources. When the user performs the SQL operations like Select, Insert etc. in the data containing in the Dataset Object, it won't directly affect the Database, until the user invoke the Update method in the OleDbDataAdapter.

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

How to SELECT from any spreadsheet in Excel File using OleDbDataAdapter

I'm using OleDbDataAdapter to extract DataSet from excel file, but I have problems with SELECT statement inside DataSet excelDataSet = new DataSet(); using (OleDbConnection con = new System.Data.OleDb.OleDbConnection(connectionString)) { …
Bryuk
  • 3,295
  • 10
  • 45
  • 74
6
votes
2 answers

Excel with ACE Timeout in .NET using Data Adapter Update

I am experiencing a timeout issue writing data from a dataset into an excel spreadsheet. Here is my connection string currently:
Bob Feeser
  • 69
  • 1
  • 5
4
votes
1 answer

Yet another no value given for one or more required parameters issue

I am attempting to get data out of an access database in VB within visual studio 2010. I am creating a select query at runtime which should return 1 row. I am then collecting the data from the returned row and placing it on a screen. This the code…
destino
  • 51
  • 4
4
votes
1 answer

Export Excel File with .xlsx Extension

I' m trying to export xlsx file with these codes: DataTable dataTable= new DataTable(tableName); OleDbDataAdapter adapter = new OleDbDataAdapter(select, accessConnection); adapter.FillSchema(dataTable, SchemaType.Source); foreach (DataRow…
Anil Kocabiyik
  • 1,178
  • 6
  • 17
  • 47
4
votes
1 answer

OleDbDataAdapter not filling all of the rows

Hey I am using the DataAdapter to read an excel file and fill a Data Table with that data. Here is my query and connection string. private string Query = "SELECT * FROM Sheet1"; private string ConnectString = "Provider=Microsoft.ACE.OLEDB.12.0;" …
Mitch
  • 389
  • 1
  • 6
  • 19
3
votes
2 answers

How to get rid of the exception "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine" in Win 7

I am running an ASP.NET C# application on .NET 4.0 framework using VS2010 on a Win 7 machine. Within my code I want to link Excel file with "DataTable" object. ie I want to access the data within Excel file and store it in DataTable object. So I…
codeLover
  • 3,720
  • 10
  • 65
  • 121
3
votes
1 answer

Schema changes not persisted with OleDbDataAdapter .Update method

I create a database with two tables in it, then I execute this code, but it does nothing to the tables at all. private void CreateConstraint(DataSet dataSet, string table1, string table2, string column1, string…
Wil
  • 31
  • 1
3
votes
0 answers

How to change default date format of Oledb adapter to MM/dd/yyyy

I am using following function in my code,to read excel input but one of the column from excel is CreateDate at that point it is not accepting MM/dd/yyyy date format. Please suggest me appropriate changes to do the same. Thanks in advance. using…
3
votes
1 answer

How to import large excel file to datatable?

I have an Excel file with 500 columns. I am using OLEDB to import it into a DataTable. But the DataTable contains only the first 255 columns. I can't figure out why the rest of the columns aren't imported. My code is public DataTable…
3
votes
2 answers

How to minimise OleDbDataAdapter time to fetch data from remote database

My Windows form Application contains OleDbDataAdapter, it is consuming longer time to fetch data from remote DB. It is not able to retrieve/Hold table data like 5000 rows(Application gets struck). Here is my code. environments =…
Shalem
  • 1,446
  • 2
  • 22
  • 47
3
votes
1 answer

Excel file - It is already opened exclusively by another user,

I am reading the excel file using C# and below is the code which is working as expected EXCEPT that every time i run the app, I have to close the excel file otherwise I get the below error message: The Microsoft Access database engine cannot open…
Nick Kahn
  • 19,652
  • 91
  • 275
  • 406
3
votes
5 answers

How to fix "Not a legal OleAut date." when reading an Excel file in C#?

I have been working with excel spreadsheets and so far I never had any problems with them.. But this error,"Not a legal OleAut date.", showed up out of the blue when I tried to read an excel file. Does anyone know how I can fix this. Here is the…
Sophonias
  • 874
  • 5
  • 16
  • 38
3
votes
0 answers

OleDbDataAdapter does not read all the data from excel in Server But works fine in local system

I am having problem reading data from excel (It contains more that 30,000 rows) using C#. When i test in local system it works fine i.e. it copies all the rows from excel, but when i deploy and run in production server it only reads around 12,000…
raj
  • 31
  • 4
2
votes
1 answer

OleDbDataAdapter.Update() with OleDbCommandBuilder

I am hitting an Oracle database using C# and OleDb, I have sucessfully pulled data from a query but I am unable to update the database using OleDbAdapter.Update(), my update code is below. ("Adapter" is a reference to the OleDbAdapter object used to…
Yends
  • 111
  • 3
  • 10
1
2 3
14 15