Solved

vb.net ado.net

Posted on 2004-08-13
9
333 Views
Last Modified: 2010-04-17
I am writing a database program using access and I would like to hardcode it. I am confussed about the disconnect and connected database.

I need to have a combobox populated with the one field of the table and when I click on the name I see in the combobox it querys the same table and pulls the rest of the data to the textboxs and queries another table in a datagrid. Now this is not going to be used for manipulation back to the database. What should I do??



Also lets say I want to make a program that many users an enter data back and fourth to a database which way is best preferred.


0
Comment
Question by:hogan9111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 1

Expert Comment

by:sunny1907
ID: 11798724
 
hi, the difrence between connected and disconnected approach is pretty easy to explain. Connected approach here means, connection to database is maintained continuouslly, once connect and stay connected. This approach is handy if database access will be used frequently. On the other hand, disonnected approach is based on reconnecting to database when needed. It  heavily depends on the application area. For vb.net and ado.net examples check tutorials. good luck


 
0
 

Expert Comment

by:ashok766
ID: 11800252
I Would suggest use discounted apporach(means dataset). B'coz reduces network traffic and DB Server resources.

0
 

Author Comment

by:hogan9111
ID: 11800727
ok, but what happens if the data that the user see has been changed.

meaning if I understand correctly, 4 users are using any application and one pulls in a certain record and so does another user the one user makes a change to one field and the other user already did and saved it what happens, I am just worried about the data not being real-time.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:hogan9111
ID: 11852536
anyone??? there
0
 
LVL 2

Expert Comment

by:rattmman
ID: 11998401
You got a good point there hogan9111,

What happens is that the last user who made the change and update overwrites the previous record.  So what you could do in the code is check if the record has change before making the update.

This problem resides all the time when you have more then one user accessing the db at the same time.  The best way to handle this I think would be to lock the data when someone is entering information in it and to unlock it when they are done, that way you could pull up the latest version.

But locking gets into a problem also when your system crashes.

Hope this helps,

If you need any more info. please tell me.

RC
0
 

Author Comment

by:hogan9111
ID: 12005896
rattmman,

yes please give me more information on your method
0
 
LVL 2

Accepted Solution

by:
rattmman earned 50 total points
ID: 12007583
Hi Hogan,

What I did to avoid this situation is that I locked the record from being editted when the first user initiates edititting, that means that they've actually started changing something in the db.  But alao to avoid the record from not being seen, I then allow other users to look at the record and not change it.

I also notify the 2nd user that looks at the same record that the record is being currently editted.

This will prevent users from overridding each other and allow users to reopen the record after the record has been editted.

This is one of three ways to deal with this probelm.  But the above method is what I've been using with access.

RC
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn different types of Android Layout and some basics of an Android App.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question