473,748 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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, "tblEmploye e") 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 1359
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******** ******@TK2MSFTN GP12.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, "tblEmploye e") 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
3170
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 formats the spreadsheet, prints it out, and manually picks out the products we need to ship. I want to import this into an Access table. Basically, the sheet with some data examples looks something like this: ...
3
1973
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. TABLE STRUCTURE QUESTION: There are two parts to this preface.
1
1509
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 devices implements one basic interface I have N clients to work with all devices. Options of implementation 1) Remoting - Owful "overhead" (IMHO) 2) Just regilar custom TCP (sending well-known string commands to hub server
1
1559
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
2657
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 search my portal (mySQL, PDF, Ms Word & others) 2. search engine that could search to few web sites specified by user/programmer
3
3058
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. I have to have a third table, correct, to connect them? I was thinking OrderDetails (or something like that) OrderDetailID
1
1261
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 there a way to convert my existing SQL Stored Procedures to LINQ code?
8
2775
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 implementation. However the SGI implementation is so old that it predates the STL, so it does not, among other things, include hash support for std::basic_string. So I tried implementing the hash map from Stroustrup 3rd edition. At the least I...
7
2162
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 the right menu, the article shows on the left column. The links have an url that look like this: http://www.myweb/library/?doc=194uf7s39
10
2075
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. basicly I found three ways: - use the entropy package (but this won't get me the latest version) - use macports (kind of apt for mac) (but I found that php was always installed together with apache2 (in the /opt/local/ directory), though with...
0
8995
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9332
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8252
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.