Simple update to a row in a table in an SQL Server database 
Author Message
 Simple update to a row in a table in an SQL Server database

I am using Visual and trying to update a very
simple form.  The form consists of  (4) text boxes.  The
first text box, employeeid, is used by the user as an
input box.  Based on the value, a parameterized query is
used to select the (1) employeeid, (2) Last Name and (3)
First Name.  I am using a data adapter and dataset to
retrieve the data.  The text boxes are bound to the text
property using Visual Studio.Net.  

Let's say the user changes the first name from William to
Bill.  After making the change in the text box, the user
would click the Save command button.  On this clicked
event I have a statement that updates the data adapter.  

The problem is - nothing gets updated.  From what I have
read, Visual Studio takes care of updating the dataset
through its data binding architecture, as long as I have
bound the text boxes to the appropriate fields in the
datatable. (using visual studio's property list for each
text box).   I tried adding 'Accept Changes' but that
didn't work either.

Although the query only retrieves one row (for the
employeeid), I decided to put a navigation button there to
see if that has any effect.  And it turns out that when I
hit the navigation button, before hitting the 'save'
button, it updates all right.  But, in this case I don't
need the navigation button.  So there must be something
I'm forgetting.

There is probably a simple answer, but I just don't know
what it is --

Thanks for your help.  

Wed, 24 Aug 2005 07:43:51 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Simple update to a row in a table in a SQL Server database

2. 2nd SQL Server update after update text field corrupts row - using RDO

3. Error: 40002 - 01S03: [Microsoft][ODBC SQL Server Driver]No rows updated or deleted

4. Error : 40002 - 01S03: [Microsoft][ODBC SQL Server Driver]No rows updated or deleted

5. SQL Server-Access: Update 1000 Rows

6. List SQL Server Servers, Databases and Tables

7. Detect New Row in SQL Server Table

8. Populating a DB-grid wit rows from large SQL server tables

9. Updating A SQL server table through DAO and ODBC In Access 2000

10. Updating attached SQL Server Tables

11. Acc2000: Access tables attached to SQL-Server won't update

12. Help me: Update SQL Server table through sqlDataAdapter...


Powered by phpBB® Forum Software