Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 05-03-2009
Member
 
Join Date: Feb 2009
Posts: 79
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
Reply With Quote
  #2  
Old 05-03-2009
Member
 
Join Date: Dec 2008
Posts: 183
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().
Reply With Quote
  #3  
Old 05-03-2009
Member
 
Join Date: Dec 2008
Posts: 128
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.
Reply With Quote
  #4  
Old 05-03-2009
Member
 
Join Date: Jan 2006
Posts: 211
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"
Reply With Quote
  #5  
Old 06-03-2009
Member
 
Join Date: Feb 2009
Posts: 96
Re: DataAdapter.Fill Exception in .NET

what are you trying to do exactly?
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "DataAdapter.Fill Exception in .NET"
Thread Thread Starter Forum Replies Last Post
Whether Re-fill or Recycle cartridge Asclepius Hardware Peripherals 4 21-02-2011 07:50 AM
How to Add Cell Fill in Excel peterjack Windows Software 1 09-02-2011 02:21 AM
Flood-Fill function : C Rajeev D Software Development 4 27-01-2010 11:21 AM
Fill JTable with several values Logan 2 Software Development 5 19-01-2010 02:39 PM
DataAdapter.Update command is not updating the database. Kiran123 Software Development 3 03-02-2009 06:34 PM


All times are GMT +5.5. The time now is 05:25 AM.