Questions tagged [oledbdatareader]

OleDbDataReader Class provides a way of reading a forward-only stream of data rows from a data source.

OleDbDataReader Class provides a way of reading a forward-only stream of data rows from a data source.

System.Object
. System.MarshalByRefObject
. . System.Data.Common.DbDataReader
. . . System.Data.OleDb.OleDbDataReader

Namespace: System.Data.OleDb
Assembly: System.Data (in System.Data.dll)

To create an OleDbDataReader, you must call the ExecuteReader method of the OleDbCommand object, instead of directly using a constructor.

Before you close the OleDbConnection, first close the OleDbDataReader object. You must also close theOleDbDataReader object if you plan to resuse an OleDbCommand object.For example, you cannot retrieve output parameters until after you call Close.

http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdatareader.aspx

175 questions
0
votes
1 answer

C# OleDb Oracle function and Table Types

i'm trying to invoke an Oracle function that returns a type encapsulated in a Table Type Object create or replace type Z_TBL_STRUCTURE_CODE AS OBJECT ( PROJ_ID varchar2(50 BYTE) ); Type table create or replace type Z_TABLE_STRUCTURE_CODE AS…
FEST
  • 813
  • 2
  • 14
  • 37
0
votes
1 answer

Exception upon retrieving DateTime field

I am retrieving DateTime data from an access data base and want to assign it to an object as a string value. OleDbDataReader dbRead = cmd.ExecuteReader(); while (dbRead.Read()) { product.DateReleased = dbRead["Date Released"] != DBNull.Value ?…
Arianule
  • 8,811
  • 45
  • 116
  • 174
0
votes
0 answers

Retrieving Large Table from Access using OleDbDataReader (Slow)

I'm currently migrating an old application that was built using VB6. The application is mainly used to process Data from an Access Database. I was using the DAO library to do all the work. I'm now migrating it to VB.net (using Visual Studio Express…
0
votes
2 answers

Splitting the key values in a dictionary

I have several keys (which represents subjects) in a dictionary and with that I associate several values(codes) per key. CODE SUBJECT 7DIM-039 Communication 7DIM-040 Communication 7DIM-041 Communication 7DIM-042 Communication 7DIM-043…
Arianule
  • 8,811
  • 45
  • 116
  • 174
0
votes
3 answers

adding List values to a dictionary

I am trying to populate a dictionary of which the subject value which is unique have various Code values that should be matched with it. CODE SUBJECT 7DIM-062 Recruitment and Selection 7DIM-063 Recruitment and Selection 7DIM-064 …
Arianule
  • 8,811
  • 45
  • 116
  • 174
0
votes
1 answer

Exclusing Items to be added to a List

I query a two tables from a database and add unique values to a generic list. If there is a value that I do not want to add to the list, how can I prevent the item from being added? using (myOledbConn = new OleDbConnection(connAccessLrProduct)) …
Arianule
  • 8,811
  • 45
  • 116
  • 174
0
votes
0 answers

OleDbDataReader lock file

I am using a oledbDataReader in C# to read data from a FoxPro database. What I would like to know is, does this lock the table that it is currently reading from? If so, how can I read from the table without locking the table. Thanks in advance.
Alicia
  • 56
  • 8
0
votes
1 answer

Call stored procedure and cursor parameter with OleDb

I'm developing an application in C# that connects to an Oracle 10g database. I'm using Oledb like this: OleDbConnection conn = ConnectionUtil.CreateConexion(); OleDbCommand cmd = new OleDbCommand(); cmd.Connection = conn; cmd.CommandText =…
0
votes
1 answer

DataReader does not see data in Excel cell if previous cell in the column are empty

I have a weird problem with reading .xls file using OleDbDataReader. Basically, it does not see a data in the cell, if the previous cells in the column are empty. If I move the row with the data at the top of Excel sheet, then everything loads…
IgorShch
  • 149
  • 1
  • 4
  • 21
0
votes
1 answer

"No data exists for the row column" error returned by 'OleDbDataReader'

I am trying to use OleDbDataReader but it is returning this error: No data exists for the row column I am using an Access database. Can anyone help me identify the source of this error? Here is my code: private void UpdateStudent_Load(object…
user1587902
  • 1
  • 1
  • 1
0
votes
2 answers

How can I use a single SQL string to create a data-set from multiple tables in C#?

I'm new to C#, and I'm kinda clueless about how to use a single sql-string to retrieve data from multiple tables (3 of them, actually). basically there are 2 master-files: Task_Information, Emp_Information And 1 transaction-file: Assignments:…
Madoo
  • 115
  • 6
0
votes
3 answers

VB.NET OleDbDataReader

i am using the OleDbDataReader to read a column from an Access database and i want to be able to use the same reader to read the column again in the same function because i am doing some comparison between 2 databases and some times the identical…
FPGA
  • 3,525
  • 10
  • 44
  • 73
0
votes
2 answers

Index was outside the bounds of the array. c# OleDbDataReader

Could someone please tell me what I am doing wrong here. I have compiled my code and I get it to read the ROWS and return the count. However, I get an error when saying the "Index was outside the bounds of the array" when I pass it to this line of…
user1475623
0
votes
2 answers

reading attributes with special names from MS ACCESS in OleDbDataReader

I have som problems with reading from accdb database when it has fieldnames with characters like "-", "%", "/" or if the fieldname is "Level". When I have something like this: string mySelectQuery = "SELECT 'Part_Time_%','Level',Level_change_reason…
matej148
  • 155
  • 1
  • 13
0
votes
1 answer

Is it safe to access OleDBDataReader after Command is closed

In java, you cannot access the ResultSet once the Statement is closed, although many times you get a small amount of fetched data making it appear to be open. But in general it is against the API rules. But in OLEDB, I'm wondering if the same rule…
Jerico Sandhorn
  • 1,880
  • 1
  • 18
  • 24
1 2 3
11
12