By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,189 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,189 IT Pros & Developers. It's quick & easy.

Multiple connections to Microsoft Access using VB 6.0

P: 3
Hello everyone...I am a beginner at programming database systems and i recently created one for my company using Visual Basic 6.0 and Microsoft Access 2003. I am facing some difficulty with the system and hope that someone will be able to aid me.

The problem occurs when several Clients input data. There was an instance where 3 employees were capturing data. Somehow data on one client's/employee's was more up to date than others. For instance if one client had 5 names stored in the database, the others only had 3. But in reality the extra 2 were not actually captured. When the client with 5 names shut down his system(VB 6.0) and restarted it, there were only 3 names in the list as well. ALL the Clients are connected to one datasource, and i used VB 6.0 to create the interface. I am facing a hard time trying to solve the issue.

Can someone please Help..

Thank you very much...

Keshav
Jul 26 '07 #1
Share this Question
Share on Google+
5 Replies


missinglinq
Expert 2.5K+
P: 3,532
You have posted your question in the Articles section rather than the Forum section. I have moved it across for you.

Welcome to TheScripts!

Linq ;0)>
Jul 26 '07 #2

P: 3
You have posted your question in the Articles section rather than the Forum section. I have moved it across for you.

Welcome to TheScripts!

Linq ;0)>

Thank you very much for the help..

But how do i get to my thread..and view if there are any replies..Thank you once again..
Jul 27 '07 #3

nico5038
Expert 2.5K+
P: 3,072
Most people here use the Access forms to manipulate the data.
When using VB you'll need to manage the storing of the records from the Grid yourself. As the data entered in the Grid isn't automatically updated in the database, you'll need to make sure that after every entered row the new data is added to the Access table.
When your code just "dumps" the data per user, than the last users data (assuming you store all after deleting the existing data) will be "leading" and other entries from other users will be "deleted"...

Nic;o)
Jul 27 '07 #4

P: 3
Jeez..Thanks a bunch for that reply..it really helps and explains a lot...Do you know a way to manage the storing of the records...Or code i could use....

Thanks again

Nathan
Aug 6 '07 #5

nico5038
Expert 2.5K+
P: 3,072
Hmm, I'm a lazy programmer and don't use this myself.
In the past on the mainframe we used "pseudo-conversational" programming to solve this problem.
It requires the addition of a username and datetimestamp to the rows to be updated. When filling the grid these fields are "stored" and when an update is needed, first all rows are selected again in a temp storage area and compared to hold the same username and timestamp. When that's the case the update transaction is started and committed when successfull. (Check on Transaction Update and Commit/Restore) When there's a difference you need to decide or the user gets to see this info and/or the opportunity to overwrite the changes.

The alternative is to allow just single row updates and to use the same username/timestamp mechanism for such a row. (Bit easier and not transaction commit/restore necessary).

Guess it's now clear why I stick to "bound" forms :-)

Nic;o)
Aug 6 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.