473,320 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
1 1445
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: aaj | last post by:
Hi all I have a continuous bound form and on each record is a tick box. The user ticks the boxes and these boxes define the batch. for future operations before they leave the page I count...
2
by: Joe Fetters via .NET 247 | last post by:
Have googled and read the VS.NET documentation can't seem to getthe answer to the following. Environment: Framework 1.1 VB.NET WinForm Access database Using all automagic tools (DataAdapter...
1
by: Greg | last post by:
I have code which creates a DataAdapter, and upddate command etc, and then finally does and update which fails. The error message which is returned is "Object Reference not set to an instance of...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
1
by: Keith | last post by:
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...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
1
by: teenagelcruise | last post by:
hi, i have a problem with my code which is i cannot update and addnew data into the database but i can delete the data.plz give me an idea.this is my code that i wrote. <html> <head> <meta...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.