473,395 Members | 1,678 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,395 software developers and data experts.

Updating Database Prob

Hi, I'm having some problems with updating an SQL Database with modified
fields from a datatable. I got the code from a Wrox book, 'Professional
VB.NET 2003', the same code can be found here:
http://media.wiley.com/product_ancil...2_23_24_25.zip \Chapter 16\AuthorEditor
Basically when I have made a change and save it, close and reopen the
program the changes that I made have gone, and it’s the original data again.
Could someone please help as I am at the end of my tether with this one!!

Cheers
Nov 21 '05 #1
2 1291


"Commander Ace" <Co**********@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
Hi, I'm having some problems with updating an SQL Database with modified
fields from a datatable. I got the code from a Wrox book, 'Professional
VB.NET 2003', the same code can be found here:
http://media.wiley.com/product_ancil...2_23_24_25.zip
\Chapter 16\AuthorEditor
Basically when I have made a change and save it, close and reopen the
program the changes that I made have gone, and it's the original data
again.
Could someone please help as I am at the end of my tether with this one!!

Cheers


I opened your zip file and there's a shed load of stuff in there.
Far more than I'm willing to sift through.
Posting just the little bit of code you thought did the update might have
meant I could give specific help.

Assuming you have the grid, a dataadaptor and a dataset.
You apply changes using one line of code.
This is something of the form:
yourdataadaptor.Update(yourdataset)

Up until you do that, any changes are just going into a locally cached
version of the data.
That's why them datasets are referred to as being disconnected.
You read em in by filling the dataset, the user fiddles with em, you write
em back using the update method.

If you got something like that line in your code then check to see you have
some sort of sql statement the dataadaptor can apply on updating.
When you generate a dataset you can check boxes to generate the select,
update delete and whatnot. If you didn't choose the update then I'm not
sure what happens, but it ain't going to get updated.

--
Regards,
Andy O'Neill
Nov 21 '05 #2
Cheers Andy, the project you want to look at is in the \Chapter
16\AuthorEditor folder of that zip file. I'm going to have a go at what you
said shortly. Thanks again

"Andy O'Neill" wrote:


"Commander Ace" <Co**********@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
Hi, I'm having some problems with updating an SQL Database with modified
fields from a datatable. I got the code from a Wrox book, 'Professional
VB.NET 2003', the same code can be found here:
http://media.wiley.com/product_ancil...2_23_24_25.zip
\Chapter 16\AuthorEditor
Basically when I have made a change and save it, close and reopen the
program the changes that I made have gone, and it's the original data
again.
Could someone please help as I am at the end of my tether with this one!!

Cheers


I opened your zip file and there's a shed load of stuff in there.
Far more than I'm willing to sift through.
Posting just the little bit of code you thought did the update might have
meant I could give specific help.

Assuming you have the grid, a dataadaptor and a dataset.
You apply changes using one line of code.
This is something of the form:
yourdataadaptor.Update(yourdataset)

Up until you do that, any changes are just going into a locally cached
version of the data.
That's why them datasets are referred to as being disconnected.
You read em in by filling the dataset, the user fiddles with em, you write
em back using the update method.

If you got something like that line in your code then check to see you have
some sort of sql statement the dataadaptor can apply on updating.
When you generate a dataset you can check boxes to generate the select,
update delete and whatnot. If you didn't choose the update then I'm not
sure what happens, but it ain't going to get updated.

--
Regards,
Andy O'Neill

Nov 21 '05 #3

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

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
11
by: chrisc | last post by:
Hello, My infamous manufacturing database continues to bane my life, mostly because I'm really stumbling around in the dark here! What I am trying to do is populate some fields automatically...
11
by: Diarmuid | last post by:
I don't understand how I update the table underlying the dataseet Heres what I have at the moment. In this simple example, it works fine until I try adapSimple.Update(dsSimple, "Customers") ...
2
by: Muhammad Qasim via DotNetMonster.com | last post by:
first sory for posting pure database question but i hav a prob n i m helpless so i m posting it my prob is my sqlserver on server machine is running ver very slow like it takes 5min to just expand...
2
by: Alexey.Murin | last post by:
The application we are developing uses MS Access 2003 database (with help of ADO). We have noticed that during massive records updating the size of the mdb file increases dramatically (from 3-4 to...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
5
by: shrimala | last post by:
Everyday when data is fed in Access, it is fine in the database; but when checked in the morning, sometimes it is corrupt. What may be the prob and how to rectify it?
15
by: sara | last post by:
I have a Memo field in a table to hold notes from a conversation a social worker has had with a client (this is for a non-profit). If the user needs to update the memo field, I need to find the...
18
omerbutt
by: omerbutt | last post by:
AJAX PROB WITH MULTIPLE RECORDS helo iam having problem in ma code will any body look out an help, i am trying t add sale record in the database and the checkthe quantity of the part slod and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.