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

No value given for one or more of the required parameters c#

The above-mentioned exception is thrown by visual studio when I run the result of this code's compilation : requete = @"select v.[*] from Visite v, Infirmière i where v.[code_inf] = i.[code_inf]" /* + " and i.[nom_inf]='" + nom + "'" + …
0
votes
1 answer

Display a 'string' from 'System.Data.OleDb.OleDbDataReader'. Access Database to C# Form

Trying to display a value from Access Database to display onto ListBox on a form. The previous form sends this form a string which is 'prevval'- for reference to the code. Not entirely sure what the issue is? Please Help!! The QuestionID is…
nivlem
  • 39
  • 1
0
votes
0 answers

Some code in my sub won't execute

I have a sub in my program that removes items from my access database if their expiration date has passed. I am using an oledbdatareader to find the rows that need deleting. My problem is that most of this sub will not execute. I have used a…
ZenLogic
  • 317
  • 1
  • 4
  • 21
0
votes
1 answer

OleDBCommand.ExecuteReader() error access 2007

I have this code: private void GenerarTicket(int prmFOLIO) { try { string Ticket = "Nombre de la tienda: UAMCAV\n" + "RFC:XXXXXX\n" + …
0
votes
1 answer

How can get result from OleDbDataReader with C# method

How can return this from method ???? this is important for me thank this is my method : public static dynamic GetFactorProperties(int factornumber) { using (var db = new OleDbConnection(cs)) { …
Mohammad Esmaeili
  • 155
  • 2
  • 2
  • 12
0
votes
2 answers

C# OleDbDataReader: Parameter Query is failing to retrieve data

I'm developing an application that reads the users data from a database (MS Access) and sets the information into variables. The sql command takes a parameter to check the username against the database, however the OleDbDataReader is showing up…
InStasis
  • 1
  • 2
0
votes
1 answer

Object reference not set to an instance of an object VB.Net OleDbCommand

Everytime i search on my database it always says "Object reference not set to an instance of an object." Please anyone help me. Thank you. Here is my code for Search: Private Sub BtnSearch_Click(ByVal sender As System.Object, ByVal e As…
Aouie
  • 119
  • 2
  • 8
  • 17
0
votes
3 answers

How do I create variable and accessing value from database?

I have access database and oledb connection like this: OleDbConnection Connection; Connection = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + Server.MapPath("~/db.mdb")); OleDbCommand Command; Command = new…
onur
  • 5,647
  • 3
  • 23
  • 46
0
votes
1 answer

OleDb where like statement error

I am trying to make a search in a oledb database using an ID (integer) or a name (string) through a windows form application. The user selects the type of search with a combobox, as the possible search type are different I use a switch to create two…
Restro Fad
  • 25
  • 7
0
votes
3 answers

Executing query using OleDbDataReader, getting OleDbException (0x80004005)

I'm having some issues with DataReader holding some data from a database.. or at least I think this is how it works. I have a ComboBox and at the start of the program I populate its Items with data from: Connect.Open(); Command.Connection =…
Matt Yoü
  • 15
  • 1
  • 7
0
votes
0 answers

Multiple readers access database

I've read about an option in the connection string called MARS (MultipleActiveResultSets), but from what I've gathered it is only a valid argument for Sql Server 2005. Is there an equivalent setting for OleDB to open an access database with multiple…
0
votes
1 answer

"No data exists for the row/column." executing OLEDB Oracle OleDbDataReader

I know this is very basic, and I've done this hundreds of times. But, for some strange reason I am executing this command on a database, and it fails when it tries to read a column from the result. If I execute this statement in SQL Plus logged in…
Jay Imerman
  • 4,475
  • 6
  • 40
  • 55
0
votes
1 answer

Getting values from OleDbDataReader

I would like to know if it is possible to retrieve a specific value from OleDbdataReader. For example, I import data from excel sheet which has 100 rows and 10 columns. Then I want the reader to get values from all the columns at specified row.…
N.Pelss
  • 15
  • 1
  • 6
0
votes
1 answer

How can I unkludgify this record-counting function?

I have this code for getting a Count value from a table: string connStr = @"Provider=Microsoft.ACE.OLEDB.12.0;User ID=NRBQBO;Password=NRBQCP;Data Source=C:\CCRWin\DATA\CCRDAT42.MDB;Jet OLEDB:System database=C:\CCRWin\Data\NRBQ.mdw"; using (var…
0
votes
1 answer

How to Show my My Queried Data using OleDbDataReader vb

I know this a walk in the park for most of you on this site, but for a n00b like me it is giving me a little trouble now, all i'm trying to do is program my "Query" button to show/search data from my access file based on a string entered in a…
Playergoodi
  • 71
  • 4
  • 12