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

Data access from a web server

All data for my company is stored on an internet web server, hosted by discountasp.net, and a web service is used for both Windows and web clients to retreive and modify it. I'm using a Microsoft Access .mdb file. A local server is not used because, although only a small business, not all employees work from a single location (some in London, others in Delhi, etc.). The trouble is that it's not particularly easy to work with the data in 'real-time'. Since several people may be modifying the same tables at once and the latest version of everything is always required, all SELECT, UPDATE, INSERT and DELETE commands are directed at the online database, through the web service. Everything works, but it's quite slow, and the constant transmission of information (even whole tables, sometimes) is eating up bandwidth

I considered using an offline database for all local operations, which can be synchronised when required, but have no idea how to do this. I'm really only a beginner, and the only thing I can think to do would be to send the whole offline database in a dataset with an UPDATE command. But that's still killing my bandwidth, isn't it

Anyway, how do updates work (I'm using C# with the .NET framework 1.1). If I update a database with a modified DataSet
does the new dataset completely replace the old data? Because that would be useless. If other users had made other changes to the tables before the synchronisation, would they be erased when I synchronise

Basically, does anyone have any ideas how I can resolve this situation (please don't say buy more bandwidth!)?
Nov 12 '05 #1
1 1922
Hi James,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know how does ADO.NET work
when updating using a DataAdapter, and how to make update faster. If there
is any misunderstanding, please feel free to let me know.

In a DataTable, each DataRow object has a property named "RowState". It is
an enumeration value, which can be the following enumerations: Added,
Deleted, Modified, Unchanged. When DataAdapter.Update is called, the method
iterates through the row collection. It calls DataAdapter.InsertCommand on
Added rows, DeleteCommand on Deleted rows, UpdateCommand on Modified rows
and ignore the Unchanged rows. If Refresh data option is checked in
DataAdapter wizard or you have added a SELECT statement in the
InsertCommand, the inserted row will also be refreshed by the value
actually inserted into the database.

It will be very slow if we update the whole DataSet in a Web Service,
because we need to send all the rows to the server. However, the Unchanged
rows are just ignored. We can use DataSet.GetChanges method to get all the
rows whose RowState values are Added, Deleted or Modified. When updating,
we just pass the diffgram to server side and merge it back to the original
DataSet after updating. This saves much bandwidth.

Here are 2 KB articles about how to update server data through a web
service by using ADO.NET.

http://support.microsoft.com/default.aspx?scid=310143
http://support.microsoft.com/default.aspx?scid=313540

If the data in database has been changed after filling to the DataSet and
before updating, the DataAdapter will be aware of it and an
DBConcurrencyException will be thrown. Here is an article about how to
handle concurrency errors.

http://msdn.microsoft.com/library/de...us/vbcon/html/
vbwlkhandlingconcurrencyexception.asp

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #2

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

Similar topics

8
by: Frnak McKenney | last post by:
Back when computer dinosaurs roamed the earth and the precursors to today's Internet were tiny flocks of TDMs living symbiotically with the silicon giants, tracking access to data processing...
7
by: Will | last post by:
On the subject of Data Warehouses, Data Cubes & OLAP…. I would like to speak frankly about Data Warehouses, Data Cubes and OLAP (on-line analytical processing). Has it dawned on anyone else...
32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
3
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no...
2
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to...
0
by: Frank Swarbrick | last post by:
Is Websphere Information Integrator supported on Linux for zSeries? Here's the deal... We are a VSE mainframe shop. We do not currently have access to any relational databases from VSE. We use...
20
by: TC | last post by:
I need an automated procedure to copy data from an Access table to a SQL Server table. Speed is important. What is the recommended technique? I can export the data from Access, copy it via FTP,...
6
by: Senthil | last post by:
Hi All We are having a VB application on SQL. But we need to collect information from persons who will be offline to verify data and insert new data. Generally they will be entering the data in...
7
ADezii
by: ADezii | last post by:
There are essentially three techniques for publishing Access Data on the Web. The first technique is static, and does not allow for the dynamic addition or modification to the data, There is no...
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...
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: 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...

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.