Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. If column not found in table or columns is added,how to handle it asp.net

If column not found in table or columns is added,how to handle it asp.net

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-nettutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi, Our application receives datas from 2 application and it is stored in SQL database. Some times in a table the column may be there or may not be there.Some times row may or may not be there. How to handle such situation in asp.net? I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures. Guhananth.S

    B A 2 Replies Last reply
    0
    • L Lost User

      Hi, Our application receives datas from 2 application and it is stored in SQL database. Some times in a table the column may be there or may not be there.Some times row may or may not be there. How to handle such situation in asp.net? I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures. Guhananth.S

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Did you check for number of columns and number of rows? e.g.

      DataTable dtData= YourClass.GetDataTable("select * from yourtableName");

      if(dtData.Columns.Count==0){return;}
      if(dtData.Rows.Count ==0){return;}


      I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.

      1 Reply Last reply
      0
      • L Lost User

        Hi, Our application receives datas from 2 application and it is stored in SQL database. Some times in a table the column may be there or may not be there.Some times row may or may not be there. How to handle such situation in asp.net? I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures. Guhananth.S

        A Offline
        A Offline
        antish1
        wrote on last edited by
        #3

        in that insert query fire and data to fetch connection class to use and easily get it :laugh:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups