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

need advice on keeping ds table & db tables in synch, in a ws (if possible)

We have an app that queries 5 tables into a dataset. Now, lets say 1 of
those tables is about to change due to user input on a webpage. Right now,
we are manually updating the db with an update command (execute non-query)
in a web service. But now, we're not sure how to now update the table in
the ds. My thinking is requery that 1 table, grab my dataset from the
session & do sda.Fill(myDS, "tblEmployee") which will keep my existing ds,
just replacing tblEmployee.

But perhaps there's a better way to do this. It would be nice if I could
just update the dataset value from the datagrid (although that seems like a
pain to do) and just do myDS.Save( ) and it automatically know which
table(s) to update in the db so the dataset & the database are in synch.

The other request I would have is, can the above be done in a web service?
(A couple years ago I played around with dropping a dataset on a page and
strong-typing it but I didn't like that it was done on a page, and not a ws.
And if the db table structure changed the entire construct broke, which was
a pain in the neck)

Thanks for any best-of-breed advice :)


Nov 15 '05 #1
1 1336
Hi Jason,

If you are updating database from datatable why do you need to refresh
datatable in first place?
You need to retrieve the autoinc field or something like that?
If this is the case, you might use Fill method with properly set commands
and the dataadapter will refresh the datatable for you.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rhand.com

" Jason Shohet" <as****@hotmail.com> wrote in message
news:eD**************@TK2MSFTNGP12.phx.gbl...
We have an app that queries 5 tables into a dataset. Now, lets say 1 of
those tables is about to change due to user input on a webpage. Right now, we are manually updating the db with an update command (execute non-query)
in a web service. But now, we're not sure how to now update the table in
the ds. My thinking is requery that 1 table, grab my dataset from the
session & do sda.Fill(myDS, "tblEmployee") which will keep my existing ds, just replacing tblEmployee.

But perhaps there's a better way to do this. It would be nice if I could
just update the dataset value from the datagrid (although that seems like a pain to do) and just do myDS.Save( ) and it automatically know which
table(s) to update in the db so the dataset & the database are in synch.

The other request I would have is, can the above be done in a web service?
(A couple years ago I played around with dropping a dataset on a page and
strong-typing it but I didn't like that it was done on a page, and not a ws. And if the db table structure changed the entire construct broke, which was a pain in the neck)

Thanks for any best-of-breed advice :)


Nov 15 '05 #2

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

Similar topics

3
by: ChadDiesel | last post by:
Hello everyone. I need some advice on table structure for a new project I've been given. One of our customers sends us an Excel spreadsheet each week containing their order. Currently, someone...
3
by: CAD Fiend | last post by:
Hello, I have a land development project that has a many-to-many relationship. I have ONE question regarding table structures, and ONE question on how to make a Form with two Subforms, below. ...
1
by: Tamir Khason | last post by:
Hi, all This time I need advice - no help ;) I have following architecture: 30 server with 100 devices connected each one Each "device" implement some (between 1 and 10) different interfaces All...
1
by: Chris Lane | last post by:
Need Advice on prebuilt Exception Assemblies Please take a look at my post on the Titled: Need Advice on prebuilt Exception Assemblies posted on 04/21/04 Thank
3
by: hazly | last post by:
I'm very new in the web technology and need advice on search engine. I want to develop a portal using PHP and MySQL on Linux. Need to know on the following features : 1. search engine that could...
3
by: jmDesktop | last post by:
Hi, probably a simple question that I have for what I think is a simple database. I have a Vendors table and an Items table. There is only one items, but several Vendors may have that same item. ...
1
by: shapper | last post by:
Hello, I have been reading a few articles about LINQ and I have a few questions: 1. What do I need to start using it in my ASP.NET 2.0 / SQL 2005 / Visual Studio 2005 web sites? 2. Is...
8
by: Jim Cobban | last post by:
I am writing a program in which I need a hash table implementation of a Map. The version of g++ available for Windo$e does not yet include the TR1 support for this. It just has the original SGI...
7
by: SM | last post by:
Hello, I have a index.php template (2 columns). The right columns contains a bunch of links (interviews, poems, etc...) The left columns contains the actual article. So if I click on a link on...
10
Dormilich
by: Dormilich | last post by:
hello, I got Mac OS 10.5.5, PHP 5 and apache2. it is working fine so far but I noticed that the apple default php installation misses some features I need. so the obvious thing is to "upgrade" it....
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...

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.