Click here to Skip to main content
15,895,538 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how do i hide the values in datagridview Pin
Eddy Vluggen4-Sep-15 5:17
professionalEddy Vluggen4-Sep-15 5:17 
QuestionMerging 3 identical datatables and summing a column in vb.net Pin
Vijay Kumar3-Sep-15 1:25
Vijay Kumar3-Sep-15 1:25 
QuestionCompare two table Pin
dha NAA3-Sep-15 0:46
dha NAA3-Sep-15 0:46 
AnswerRe: Compare two table Pin
Ralf Meier3-Sep-15 1:51
mveRalf Meier3-Sep-15 1:51 
GeneralRe: Compare two table Pin
dha NAA3-Sep-15 3:24
dha NAA3-Sep-15 3:24 
AnswerRe: Compare two table Pin
Richard Deeming3-Sep-15 2:54
mveRichard Deeming3-Sep-15 2:54 
GeneralRe: Compare two table Pin
dha NAA3-Sep-15 3:24
dha NAA3-Sep-15 3:24 
GeneralDesign question about access to database. Pin
Member 116832511-Sep-15 22:34
Member 116832511-Sep-15 22:34 
First a quick description of the problem. A piece of software written in VB handles a lot of stuff. 6-8 active users at a time. One module deals with planning and got 2-3 users which use this.

Up until recently only one user was actively using this module but structural changes within the workforce has changed this.

This has brought on a problem where changes to the planning seems to disappear for those that plan. My problem when fixing this is that I'm not 100% exactly what does what so I want to create a solution that is as small and clean as possible to fix the issues as we are moving to another system sometime within the next 4month-2years.

The module queries an SQLDatabase and then renders the used table using some fancy VB6 graphics. Changes are made and then saved.

When a save is made a lot of rows are deleted and then remade with the new data. I think the problem might be that what is deleted isn't just those entries that are changed but a large chunks of rows fit inside the selection criteria. This means that if 50 rows are selected and 5 changed by user A which saves if user A got the data before user B made it's changes user B's changes are overwritten if their are included inside the selection criteria.

Those who use this module swear that they use the reload function correctly to make sure they got the latest data and then swiftly make their changes and saves and that in order to avoid the problem they make sure only one is editing at the time but you know... ...users. D'Oh! | :doh:

One of the things I'm working on adding is a check where I look if someone else has changed the data before saving and compare. If user A's and user B's changes doesn't overlap I will merge these instead of overwriting everything and if there are conflicts I will promt the user as to which change they want to use.

This should fix it because even if the query selection returns the same set of data in a majority of cases they are working on different parts of this set.

That's what I've been doing so far and will implement. Even if it doesn't fit 100% what they want this will be what they get.

That should hopefully describe the current situation. Since they actually try to avoid working at the same time my boss also suggested to add a lock/semaphore to enforce the idea that only one user can edit the data. And I just wanted to get some input on a quick way of doing it.

I was thinking of adding three controls/buttons and a status window. Status window will show if and who is currently editing if its locked or if its free to take the position as editor.

Lock and unlock button as well as force unlock.

Super easy to add this as well as the logic behind this that I figured.

I'll add a table which I plan to use as my lock. This will contain one entry which says if the table should be locked. If so, who is currently owning the lock and time of locking.

Add some queries to the buttons and a few other places in the code and bam, only one user can edit.

I'm interesting in viewpoints on my solution as well as other ways to do it. What I like with this is the simplicity to implement for me and simple way of making sure that the users always can force an unlock if something should happen.
GeneralRe: Design question about access to database. Pin
CHill602-Sep-15 6:02
mveCHill602-Sep-15 6:02 
GeneralRe: Design question about access to database. Pin
Member 116832513-Sep-15 1:38
Member 116832513-Sep-15 1:38 
GeneralRe: Design question about access to database. Pin
GuyThiebaut3-Sep-15 0:04
professionalGuyThiebaut3-Sep-15 0:04 
GeneralRe: Design question about access to database. Pin
Member 116832513-Sep-15 1:28
Member 116832513-Sep-15 1:28 
GeneralRe: Design question about access to database. Pin
GuyThiebaut3-Sep-15 1:40
professionalGuyThiebaut3-Sep-15 1:40 
GeneralRe: Design question about access to database. Pin
Member 116832513-Sep-15 1:47
Member 116832513-Sep-15 1:47 
GeneralRe: Design question about access to database. Pin
GuyThiebaut3-Sep-15 1:57
professionalGuyThiebaut3-Sep-15 1:57 
GeneralRe: Design question about access to database. Pin
Member 116832513-Sep-15 2:19
Member 116832513-Sep-15 2:19 
GeneralRe: Design question about access to database. Pin
GuyThiebaut3-Sep-15 2:25
professionalGuyThiebaut3-Sep-15 2:25 
Questioninsert one data table to another Pin
dha NAA1-Sep-15 19:10
dha NAA1-Sep-15 19:10 
AnswerRe: insert one data table to another Pin
Wendelius1-Sep-15 19:50
mentorWendelius1-Sep-15 19:50 
Questionmake report Pin
Joebpn131-Aug-15 18:11
Joebpn131-Aug-15 18:11 
AnswerRe: make report Pin
Richard MacCutchan31-Aug-15 20:57
mveRichard MacCutchan31-Aug-15 20:57 
AnswerRe: make report Pin
ZurdoDev2-Sep-15 5:25
professionalZurdoDev2-Sep-15 5:25 
QuestionSQL Linq, IQueryable, Join and multiple contains Pin
jkirkerx26-Aug-15 10:28
professionaljkirkerx26-Aug-15 10:28 
QuestionEasy to use VB.net code with Tesseract 3.02 Pin
ezio200024-Aug-15 23:54
ezio200024-Aug-15 23:54 
AnswerRe: Easy to use VB.net code with Tesseract 3.02 Pin
Eddy Vluggen31-Aug-15 7:09
professionalEddy Vluggen31-Aug-15 7:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.