Solved

vb.net ado.net

Posted on 2004-08-13
9
304 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
9 Comments
 
LVL 1

Expert Comment

by:sunny1907
Comment Utility
 
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
Comment Utility
I Would suggest use discounted apporach(means dataset). B'coz reduces network traffic and DB Server resources.

0
 

Author Comment

by:hogan9111
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:hogan9111
Comment Utility
anyone??? there
0
 
LVL 2

Expert Comment

by:rattmman
Comment Utility
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
Comment Utility
rattmman,

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

Accepted Solution

by:
rattmman earned 50 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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 …

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now