Results 1 to 5 of 5

Thread: DataAdapter.Fill Exception in .NET

  1. #1
    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

  2. #2
    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().

  3. #3
    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.

  4. #4
    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"

  5. #5
    Join Date
    Feb 2009
    Posts
    96

    Re: DataAdapter.Fill Exception in .NET

    what are you trying to do exactly?

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,414,370.82597 seconds with 16 queries