DataAdapter.Fill Exception in .NET
I get the following exception when I try to store the content of a Microsoft Database (.MDB File) in a table, with DbDataAdapter.Fill method.
System.InvalidOperationException: The provider could not determine the Object value. For example, the row was just created, the default for the Object column was not available, and the consumer had not yet set a new Object value. at System.Data.OleDb.ColumnBinding.Value()
The stack-trace of the exception is the reported below:
System.InvalidOperationException: The provider could not determine the Object value. For example, the row was just created, the default for the Object column was not available, and the consumer had not yet set a new Object value.
Does anyone could give me any advice?
Thanks in advance
Re: DataAdapter.Fill Exception in .NET
I was getting this error message until I started putting together a small demo to isolate the problem ... the demo worked fine. Turned out there was one date value that had a day of "00" in my data and that was causing the problem. My data was being populated by an outside source (direct SQL) rather than an application, which allowed the invalid date field. Daniele, it might be worth checking your date fields if they are being populated externally too. I've had no other problems with dataAdapter.Fill().
Re: DataAdapter.Fill Exception in .NET
SqlDataAdapter manages the connection itself, meaning it opens the connection
and it closes the connection. If, OTOH, you tell it the connection and you
open the connection yourself, it detects this and it will not close the connection.
So since you opened it you're responsible for closing it.
Re: DataAdapter.Fill Exception in .NET
Hello,
I checked my parameter command, but it always has a
CommandText = "select ..."
CommandType = "Text"
Connection=System.Data.Odbc.OdbcConnection
The error changes sometimes:
"Object reference not set to an instance of an object"
"Invalid attempt to Read when reader is closed"
Re: DataAdapter.Fill Exception in .NET
what are you trying to do exactly?