Martin

Martin

  • NA
  • 1
  • 0

Read unknown data from oledbdatareader?

Mar 3 2010 11:45 AM

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)