Column does not belong to table error

Discussion in 'ASP .Net' started by Guest, Sep 6, 2006.

  1. Guest

    Guest Guest

    We are using .NET 2.0 and intermittently egt the following errors on almost
    all our web pages. The error is not repoducable and cycling the worker
    process seems to temporarily fix the problems. Has anyone seen this or have
    any suggestions?

    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 9/5/2006 4:23:47 PM
    Event time (UTC): 9/5/2006 11:23:47 PM
    Event ID: cb408727296440278fb486579b359b15
    Event sequence: 330
    Event occurrence: 4
    Event detail code: 0

    Application information:
    Application domain:
    Trust level: Full
    Application Virtual Path: /NARROWCAST2005
    Application Path: C:\Inetpub\BFI_info\NARROWCAST2005\
    Machine name: CARL

    Process information:
    Process ID: 3148
    Process name: w3wp.exe

    Exception information:
    Exception type: ArgumentException
    Exception message: Column 'TFTAgentName' does not belong to table .

    Request information:
    Request URL:
    Request path: /NARROWCAST2005/NCEditResultsOut.aspx
    User host address:
    Is authenticated: False
    Authentication Type:
    Thread account name: NT AUTHORITY\NETWORK SERVICE

    Thread information:
    Thread ID: 1
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace: at System.Data.DataRow.GetDataColumn(String columnName)
    at System.Data.DataRow.get_Item(String columnName)
    at NCEditResultsOut.Page_Load(Object sender, EventArgs e) in
    C:\Inetpub\BFI_info\Narrowcast2005\NCEditResultsOut.aspx.vb:line 37
    at System.Web.UI.Control.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Custom event details:
    Guest, Sep 6, 2006
    1. Advertisements

  2. under some senerio, you fill the dataset with an unexpected result set, so
    the column does not exist. it will be a bug in your code or sql

    -- bruce (
    bruce barker \(\), Sep 7, 2006
    1. Advertisements

  3. Guest

    Guest Guest

    I have trapped the error on several occasions and have displayed the table
    column names and the column that it says does not exist is in fact in the
    table. Any other ideas?
    Guest, Sep 7, 2006
  4. I have the same problem (project SQL2005_ASP.NET 2.0), error occurs from time
    to time, cannot be reproduced.
    Warnings generated in Event Log:
    DataBinding: 'System.Data.DataRowView' does not contain a property with the
    name 'ID_PRODUCT'
    Column 'PRODUCT_CATEGORY_NAME' does not belong to table ProductCategory.
    (ProductCategory is a datatable, all data are taking from db by sql
    The problem causes blocking all pages with data displayed from db (error info)
    or displaying no data from db (there are empty webparts, static graphic
    elements and no error info).
    One way of fixing it is restarting of SQL Server service. It helps temporary.
    I got info that SP1 for SQL Server 2005 stopped this problem but not in my
    case, I have 9.00.2153 version and still have this problem.

    Who can give the cure for this problem will be great for me....
    apieczyk via, Sep 12, 2006
  5. Guest

    joinz79 Guest

    Hi, unfortunately I've the same problem too.

    I tried all solutions in vain.

    My web app (in 2.0, c# code behind, database SQL Server 2005
    SP1) sometimes goes crazy, columns not in tables and similar.

    The problem grew up when the app increased the number of accesses.

    The code is ok, I think the problem's sql server 2005.
    I don't know what could I do furthermore, I'm very depressed.

    Who can give an help for this problem will be great for me, thank you
    very much.
    joinz79, Sep 29, 2006
  6. Guest


    Apr 4, 2008
    Likes Received:
    It looks like no one else has found a cure for this yet.
    I don't know that I found the solution, but I did find a workaround.

    First, before we saw this problem, our web app (ASP.NET 2.0, C#, SQL 2005) was working fine in prod and test.
    We put a new version on the test server and everything was working fine.
    When we promoted to production, we changed a few things in prod:
    1. we went from SQL2005 to 2005 SP1.
    2. we went from a config where the web server and DB were on separate machines, to everything on one machine.
    3. we did an incremental deployment (meaning, we didn't deploy all files, but just the ones that changed for this release).
    4. we changed the web application package so it ran under a different identity.
    5. we made a change to web.config to accomodate the db change (see #2)

    After that, things got weird: it would work fine for a while. Then, pages that were working, started getting errors saying that the wrong number of columns were returned. If we restarted IIS or reset the application package, things would work for 15 minutes, then everything went to he||. Random pages had random errors while reading query results from the DB. Its like ADO was omitting fields that were returned. So bizarre! We tried everything we could think of for 4 days, with no solution.
    [Solution] On day 5, we moved the database to a separate server (like our test env), (SQL2005-no-sp). We deleted all content from the production server. We copied all content from test to prod. We changed the web.config to point to the prod database. *bingo* it started working.

    I don't think the cure came from having SQL on a separate box. I think there may have been something screwy in the deployment files. It is only a theory.

    Maybe, if someone else runs into the same problem, my story might help.

    If anyone has a deeper insight into what the *true* cause of this strange problem, please post your insight. I would really like to know what this was all about, in case it happens again.
    tgolisch, Apr 4, 2008
  7. Guest


    Apr 13, 2008
    Likes Received:
    Same probleme on Oracle


    I'm having the same with an Oracle Database. So I think that the problem is on ADO .Net side.
    Didn't find a workaround yet :(
    kYann, Apr 13, 2008
  8. Guest


    Jul 10, 2008
    Likes Received:


    Was there any resolution to this?

    I am getting this error about 2-4 times a day, which occurs for any operation on the site and lasts for about 10 minutes until it eventually "comes right" by itself. It is very intermittent however and haven't been able to find a way to reproduce.

    We've looked at SQL connections and made sure they are not stored
    statically or in sessions and they are created once per thread.

    Any clues? The issues started up when jumping into a production environment with approx 50-100 users.

    Mike, did you find a solution to this?

    Haemoglobin, Jul 10, 2008
  9. Guest


    Oct 21, 2008
    Likes Received:
    A solution I've found.

    I had a class which I used to pull datarows, datatables, and execute statements. This class had a shared variable inside it for the connection object. I had this problem all the time and it was driving me crazy. Eventually I wondered if having the connection object as a shared variable was causing this problem. I removed that shared var and put private connection variables inside all the functions and the problem went away. I think it decreased performance a little bit though. A small price to pay to have things work.
    apexearth, Oct 21, 2008
  10. Guest


    Mar 23, 2009
    Likes Received:
    Silly Question, but..

    This may sound silly, but has any of you got a computer on your network infected? I've being having this problem right after one computer got seriously infected with a virus that totally hijacked the computer.
    mcohen, Mar 23, 2009
  11. Guest


    Jun 18, 2009
    Likes Received:
    This is the solution

    We had this exact problem and we solved it.

    Using static (C#) or shared (VB) .Net data classes on a multi-processor server will cause this error. The data class and its objects, e.g. DataTable, get resused across threads for some reason. So when when two requests come in at the same time, the second request overwrote the DataTable object variable with its own results, causing the first request to fail when it went looking for its tables, columns, etc.

    This problem only occurred on multi-processor servers and went away when we declared our data classes without static or shared.
    tferris, Jun 18, 2009
  12. Guest


    Jan 11, 2010
    Likes Received:
    I have same problem , in production throw exception : "Column 'YahooId' does not belong to table Table."
    But there are not any line code access "YahooId" column. I am getting this error 2 days.
    In this link :

    But I don't understand how to fix , because I am getting legacy code from other developers.
    debugger, Jan 11, 2010
  13. Guest


    Mar 26, 2010
    Likes Received:
    problem solved
    xisket, Mar 26, 2010
  14. Guest


    Aug 18, 2010
    Likes Received:
    I do not understand, i have to change all my code ? Must have a solution to this ? MS say nothing ?
    gbulfon, Aug 18, 2010
  15. Guest

    Mani Tal

    Mar 11, 2015
    Likes Received:
    I have same problem. pls suggest some work around for the same..
    Mani Tal, Mar 11, 2015
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.