In my codebehind I have this vb:
Dim reader as idatareader = includes.SelectDepartmentID(PageID)
While reader.Read
Did = reader("departmentid")
GroupingHeading = reader("heading")
Folder = reader("folder")
If reader("OwnBanner") Is DBNull.Value Then
OwnBanner = Str...
Hey,
I have a DropDownList called (DDL) in ASP.net page, I want that DDL contains some records of a table in the data base.
So I did this :
DDL.DataSource = myDataReader
DDL.DataBind()
But it's giving me (5 records) "the number of records of the table" but like this :
System.Data.Common.DataRecordInternel
System.Data.Common.DataRe...
Hey,
I have a query that returns one row so I want to display it in the Label, but I can't find the property DataSource on it.
How can I do this ?
...
Hey,
I have this problem :
[InvalidOperationException: No data exists for the row / column.]
System.Data.OleDb.OleDbDataReader.DoValueCheck(Int32 ordinal) +1029063
System.Data.OleDb.OleDbDataReader.GetInt32(Int32 ordinal) +12
ASP.addsousvoyage_aspx.hdVoyage_SelectedIndexChanged(Object sender, EventArgs e) in C:\Users\ZiGi\Des...
I'm using Spring batch - using datareaders to load up lists of items. For each of my readers, they all return an extra null object on the end of the list.
Has anybody seen this before? What am I doing wrong?
...
I have a console application that extracts data from a SQL table to a flat file. How can I get each column type and length and then use the lenght of each column to padright(length) to get the spaces at the end of each field. Here is what I have right now that does not include this functionality.
Thanks
{
var destinatio...
I have the following code and i want to loop through all the fields in the result of this query and populate the dictionary called field.
Given a datareader is this possible?
OracleCommand command = connection.CreateCommand();
string sql = "Select * from MYTABLE where ID = " + id;
command.CommandText...
Is it possible to grant the datareader privileges to a SQL Server Database Role rather than a User?
...
Hello;
I'm trynig to connect to a database, but I get this error :
Failed IErrorInfo.GetDescription with
E_FAIL (0x80004005)
Dim ReqTest As String
Dim MR As OleDbDataReader
Dim cne, idc As Integer
ReqTest = "SELECT * FROM READ"
MR = Connexion.lecture(ReqTest)
MR.Read()
With :
Public Shared Function lecture(ByVal requete As St...
Hello,
I'm creating input radio dynamicly on a ASP.NET page using PlacHolders.
While reader.Read
Dim ltr As New Literal()
Dim ltr1 As New Literal()
Dim ltr2 As New Literal()
Dim ltr3 As New Literal()
Dim ltr4 As New Literal()
ltr.Text = reader.GetString(2) & "<br />"
PlaceHolder2.Controls.Add(ltr)
ltr1.Text = "<form> <input type = radi...
Hey,
After connecting to a database using DataReader, how can I count the number of rows ?
Thanks.
...
Hey,
How can I go back to the previous row using OleDbDataReader.
I know that DataReader just advance to the next row using DataReader.Read(), but how can I go back to the previous row. ???!!
...
Hey,
I created a button (Next) to navigate in a Table called CHAPTERS;
My problem is that the button work Two, and sometimes three times. After that I get [Not specified error].
This is my code :
Dim S As Integer = Integer.Parse(Request.QueryString("id"))
Dim RQ As String
Dim DR As OleDbDataReader
RQ = "SELECT ID_C FROM CHAPTRES"
...
Hi.
I am not sure how to phrase my question properly but I want to achieve something like this.
I have a class named Products
public class Products
private ID as Integer
private Name as String
Public Property ProductID()
Get
Return ID
End Get
Set(ByVal value)
ID = value
End Set
End Property
In one of my code behin...
Note: You may not need to read the whole thing to know what's wrong... skip down to the part about the 3 scenarios if you'd like. Only read the begin if you'd like some background info on how I've tried implementing this and where the errors occurred.
To begin with, I'm trying to retrieve a list of Clients stored in the CRM_Clients tabl...
Hi,
I need to iterate twice through a DataReader. Is there a way to do this without using DataSets and without running the query twice? I'm using C#, by the way.
Thanks
...
Dictionary Fields = new Dictionary();
for (int i = 0; i < reader.FieldCount; i++)
{
Fields.Add(reader.GetName(i), i);
}
this._MyField1 = reader.GetString(Fields["field1"]);
this._Myfield2 = reader.GetInt16(Fields["field2"]);
doing this makes me want to cry but i can't seem to figure out how to use the type specfic retrieval meth...
Please help, how do I make a while loop equivalent of this for loop. So that I could read from one row in the table of mysql database and display it on the combobox in vb.net.
I use this code, but its definitely not useful if there are 3 or more items that are added in the row:
Dim i As Integer
Dim rdr As Odbc.OdbcDataReader
...
My .NET MVC project has reached the stage of testing with multiple users and I am getting seemingly random errors (from any screen in the site) relating to Linq2Sql DataReader issues, such as:
'Invalid attempt to call FieldCount when reader is closed.' and
'ExecuteReader requires an open and available Connection. The connection's current...
Hello, Everyone!
I am currently struggling with MySQL database with DataSet. The thing is that it uses loads of memory(as I found somewhere over the net it uses almost 4x memory rather than when you are using DataReader).
What I was thinking is to make a function that will use DataReader for the SQL SELECT command.
What I am currently t...