Solved

vb.net ado.net

Posted on 2004-08-13
9
316 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
count8 challlenge 13 117
groupSumClump challenge 9 98
delphi parse string to params 3 97
parse convert xml feed to text (python) 2 67
This article will show, step by step, how to integrate R code into a R Sweave document
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.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

18 Experts available now in Live!

Get 1:1 Help Now