Welcome to Dream.In.Code
Become a VB Expert!

Join 150,239 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,347 people online right now. Registration is fast and FREE... Join Now!




Multi User considerations in DB programming

 
Reply to this topicStart new topic

Multi User considerations in DB programming, get notificatin from FireBird Server in MultiUser

YogiYang
7 Dec, 2007 - 03:58 AM
Post #1

New D.I.C Head
*

Joined: 7 Dec, 2007
Posts: 4


My Contributions
I am trying to develope an application for document archiving. I have use FireBird RDBMS (coz. it is free) for storing data. Am using VS 2005 and FireBird's ADO.NET Provider.

The software is running just fine. But the problem is follows:

If I am viewing a set of data which is take from two separate table using an SQL query. Now if any other user updates the data in any of these tables the updated changes are not reflected in my view.

How can I get this to happen?

By default DotNET uses Disconnected database connection concept.

Any help will be much appreciated.

TIA

Regards

Yogi yang
User is offlineProfile CardPM
+Quote Post

YogiYang
RE: Multi User Considerations In DB Programming
8 Dec, 2007 - 02:22 AM
Post #2

New D.I.C Head
*

Joined: 7 Dec, 2007
Posts: 4


My Contributions
There is no reply. What is the problem? Have I posted to the wrong forum?

User is offlineProfile CardPM
+Quote Post

baavgai
RE: Multi User Considerations In DB Programming
8 Dec, 2007 - 02:52 AM
Post #3

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 2,285



Thanked: 136 times
Dream Kudos: 475
Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua, Cheese

My Contributions
QUOTE(YogiYang @ 8 Dec, 2007 - 05:22 AM) *

There is no reply. What is the problem? Have I posted to the wrong forum?


Might go better in databases, but I'll give it a go.

QUOTE(YogiYang @ 7 Dec, 2007 - 06:58 AM) *

If I am viewing a set of data which is take from two separate table using an SQL query. Now if any other user updates the data in any of these tables the updated changes are not reflected in my view.

How can I get this to happen?

By default DotNET uses Disconnected database connection concept.


Short answer, you can't.

The disconnected nature of the transaction is irrelevant for you problem, so ignore that part. Your issue is with database concurrency.

Basically, every time you query a database the result set is only valid for the time of the request. The very next nano second after your request, someone may have committed changes. The real headache is when two people post changes to the same set of data sequentially, in which case last update wins; usually.

There's no real solution, it's just the nature of a multi user environment. If its vital that your current view of the data be up to date then you best bet is to periodically re query the database to catch any changes.

Hope this helps.

User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 06:19AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month