473,325 Members | 2,771 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,325 software developers and data experts.

Text Box and Data Binding Question

Hi,

I am trying to learn the VB.NET approach and am having problems with
updating the database. What I have is a simple windows form using text
boxes for entering name, address and phone. It is using a web service to
load the dataset and update the data.

Here is what I am doing.
I have an existing record in the database.
I created a datagrid bound to the dataset.
I make a change to the datagrid "address" column
I click the save button and it saves back the changes.
Everything works as expected to this point. The data in the database has
changed.

From here I try to get the text box update to work.
I delete the grid in the IDE
I add text boxes
I bind the text boxes to the dataset column Address, city, state, zip,
phone etc..
I start the form and it populates the textboxes correctly. All is well to
this point.
I change the street address in the address textbox (it doesn't have any
database keys on it.)
I click the save (exactly the same "Save" as for the datagrid)
I look at the record and it isn't updated.
Here is what my save button looks like.
If Ds1.HasChanges() Then
ws.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim diff As New AClient.localhost.dsBank

diff.Merge(Ds1.GetChanges())

diff = ws.UpdateClient(diffBank) 'updates through the web service

Ds1.Merge(diff)

End If

The"if ds1.HasChanges() " check comes up false and doesn't execute the
updating code.

Is there something special you have to do to a form with text boxes that is
different than with a datagrid?

Is there another property I need to set? Or any other suggestions?

Thanks for any suggestions you can offer.
Lance

Nov 20 '05 #1
0 3795

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and...
1
by: matty.hall | last post by:
There's a lot of information out there about data-binding UI objects (i.e. derived from Control) to non-UI custom business objects. Is it possible to do the same without any UI being involved at...
6
by: Alpha | last post by:
I have several textboxes that I need to chang the text when the selection row is changed in a datagrid. I have the following code. This textbox displayes the initial selection but when I click on...
6
by: Lance Geeck | last post by:
I have a simple form where I am using a dataset called Client. On the data entry screen, there are name, address, city state and zip. I have the fields bound to the dataset field. (Properties...
1
by: msmcg | last post by:
I need to format the data in some textboxes using the Binding method with custom Currency and ShortDate format and parse handlers. Here is the code that I am using. I call it on the form load...
1
by: Barry Gast | last post by:
Hi. I seem to be running into a problem with binding the text property of a text box to a column in a data table. When the user updates the text in the text box through the interface (form), the...
3
by: Marnie | last post by:
Hi there I am new to VB.Net (formerly a Centura 'Gupta' programmer) and just trying to do a simple excercise out of the help to populate a couple of text fields on a form by using a parameterized...
0
by: oracle | last post by:
Greetings, I have a combo box that I binded to a data set using text and tags. I want it to display the DRT.Name property and have a DRT.UnitId as a value. ...
19
by: Larry Lard | last post by:
In the old days (VB3 era), there was a thing called the Data Control, and you could use it to databind controls on forms to datasources, and so (as the marketing speak goes), 'create database...
1
by: =?Utf-8?B?Q2hyaXMgRy4=?= | last post by:
Hey all, I'm coming from the ColdFusion world and am pretty new to .Net2. My issue is, I've got a page where the content (with html formatting included) is stored in a db table field. In MS...
0
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...
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...
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)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.