2
Answers

Read unknown data from oledbdatareader?

Photo of Martin

Martin

15y
4.3k
1

HI,
If I use this code below
command =
new OleDbCommand(SQLQUERY, myconn)
myReader = command.ExecuteReader();
while (myReader.Read())
{
while (i < myReader.FieldCount)
   {   
      value = value + myReader.GetString(i) +
"\t ";
      i++;
   }
listBox1.Items.Add(value);
value =
"";
i = 0;
}

Then all the data must be of string value, Is there a option to check the type of value the next value is or must i know this?
 

Answers (2)