Problem using ODBC with MySQL

  • Thread starter Thread starter Faisal Yaqoob
  • Start date Start date
F

Faisal Yaqoob

I am using MySQL ODBC driver and System.Data.Odbc package to connect to
database.

I am using OdbcDataReader to read the recordset returned as a result of a
query.
I do check if the column value is null or not before reading it using
OdbcDataReader.IsDBNull(column_index)
This function throws an exception saying "Specified Cast is not valid" if
the column type is varchar ans contains an empty string (not a null), and
any subsequent calls on the said OdbcDataReader fails.

Is this the problem with the Odbc classes or the Odbc driver?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top