Simply update a row in SQL Server from Windows Form????

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I'm having a great deal of difficulty doing a very simple thing.
This is what I want to do.
On a Windows Form - NO DATAGRID....
I have various text boxes, into which I want to show fields and etc. from
the row.
I want to connect to SQL Server, open a table and retrieve a specific row
(or create it if it's not there) and show the fields in the form.
I want to add or modify data in the form, then upload the change to the SQL
server.
This seems like it should just work fine.
I've got my SQL connection working, seems fine.
I've got my SQL data adapter working, seems to work fine.
I've created a dataset, set all the form controls' text property to show the
dataset element appropriate to it.
I've created a button. In the click event, callign the
sqlDataAdapter.Update(dataset), but it appears to do nothing. I've tried a
number of other things, and it just doesn't want to work.
I'm sure someone can give me a quick example of how to get this to work...
please?
Thanks
 
Hi
I'm still having trouble with this.
Note that my form is able to retrieve the correct row, based on a
selectcommand that's built based on user input... it appears in the form
elements just fine.
When I change any values and the control loses focus, I'm trying to fire the
Update method to update the sql database table, but it just does nothing, no
update, no errors, etc.
Thanks
 
Back
Top