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. General Programming
  3. C#
  4. OdbcDataAdapter query on update()..

OdbcDataAdapter query on update()..

Scheduled Pinned Locked Moved C#
helpdatabasequestionannouncementcareer
2 Posts 2 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.
  • J Offline
    J Offline
    jamesjk
    wrote on last edited by
    #1

    Hello friends, Could somebody help me to solve the below issue. I am using odbcdataadapter in my application the select query for the adapter is something like this.. select * from employees where wages <5000 I display the records in an interface & let the user to edit it. When the user increases the salary of the employee above 5000.., I call the update function of the adapter class to update the dataset. the databse is updated correctly & the value in the dataset is also updated for the row. But my prob is, on updating I want the row to be removed from the dataset, since the where condition fails. But it doesn't happen in my case . Am I missing some important link.. else what is going wrong .. the where condition works fine only on the initial loading .. Thanks for the help in Advance

    B 1 Reply Last reply
    0
    • J jamesjk

      Hello friends, Could somebody help me to solve the below issue. I am using odbcdataadapter in my application the select query for the adapter is something like this.. select * from employees where wages <5000 I display the records in an interface & let the user to edit it. When the user increases the salary of the employee above 5000.., I call the update function of the adapter class to update the dataset. the databse is updated correctly & the value in the dataset is also updated for the row. But my prob is, on updating I want the row to be removed from the dataset, since the where condition fails. But it doesn't happen in my case . Am I missing some important link.. else what is going wrong .. the where condition works fine only on the initial loading .. Thanks for the help in Advance

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

      It sounds like you're not using a DataGridView, otherwise the update would have been made to both the Datasource and the DataGridView. What are you using to display the records? Because if you're not using an Autobound Control then you will have to re-execute your Select Query to Fetch the updated records.

      Live in fragments no longer. Only connect.

      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