By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,567 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,567 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
"Keith" wrote:
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

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.