Solved

vb.net ado.net

Posted on 2004-08-13
9
341 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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 …
Simple Linear Regression

622 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