How do I update a specific field in a SQL Data Base, using VB5?

Locked How do I update a specific field in a SQL Data Base, using VB5?

  • Wednesday, February 22, 2012 2:42 PM
     
      Has Code

    I have a SQL Table already bound in the form of Visual Basic 2005, containing several fields. When I want to update it, I use the commands:

    BindingSource.EndEdit ()
    TableAdapter.Update (DataSet.Table)


    But I need  to update a specific field in that table, using the same form. How do I do this?

All Replies

  • Sunday, April 01, 2012 8:20 AM
     
     Proposed Answer

    Hi WillianRobert,

    if you want to update specific Field in SQL Server. then you have to execute Update SQL Query Like below.

    "update TableName set FieldName=Value where UniqField=Id";

    Regards

    Anand

    • Proposed As Answer by gimwealan Friday, April 13, 2012 8:55 AM
    •  
  • Friday, April 13, 2012 8:56 AM
     
     

    Hello,

    Use the update query as Anand said like this

    update tablename set columnvalue = value where <criteria>