DataReader, mySQL and Text fields

  • Thread starter Thread starter Larry Lowry
  • Start date Start date
L

Larry Lowry

The following code has been working really well for me.
Dim sSql as String = "Select ctDateTime,ctArea From
tblContacts"
Dim db As OleDbConnection = New OleDbConnection(sDBCS)
Dim dc as OleDbCommand = New OleDbCommand(sSql,db)
db.Open()
Dim dr as OleDbDataReader = dc.ExecuteReader()
dtgrid.DataSource = dr
dtgrid.DataBind()
dr.Close()
db.Close()

If I add one more field to the select (a "Text" data type)
I get the error below. Any one with suggestions.
Line 22 is the line that is failing. The ExecuteReader.

TIA

Larry Lowry

=============================================================

No error information available: DB_E_NOTABLE(0x80040E37).
Description: An unhandled exception occurred during the
execution of the current web request. Please review the stack
trace for more information about the error and where it
originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error
information available: DB_E_NOTABLE(0x80040E37).

Source Error:

Line 20: Dim dc as OleDbCommand = New OleDbCommand
(sSql,db)
Line 21: db.Open()
Line 22: Dim dr as OleDbDataReader = dc.ExecuteReader()
Line 23: dtgrid.DataSource = dr
Line 24: dtgrid.DataBind()
 
Hi


This error generated when there is an error in the SQL
statements used.

Error could be :
The specified table does not exist. The error string
should contain the table name

First Check whether you are able to execute query in QA
or not.

HTH
Ravikanth[MVP]
 
The table does exist and the query works fine from
the QA in mySql. I just tried it from a windows script
with standard ado and I have the same problem. This is
probably a problem with the mySQL Oledb driver. I'll
keep looking.

Thanks

Larry
 
Back
Top