Link to home
Start Free TrialLog in
Avatar of Jimbo99999
Jimbo99999Flag for United States of America

asked on

General Debugging VB.net Process Methodology

Good Day

Experts:
Details are sketchy but hope someone can ask some leading questions or has any ideas.  But here is what I have so far:

I have encountered a situation here that I am not sure how to handle.  Let me explain first what transpired.  A Customer had a VB.net process running that produces let's say Orders from Pre-Orders.
The process takes some time to run if there are a lot of Orders.  For some reason there is speculation that the Server at the Customer site "times" jobs out after X amount of minutes.  Well, if the process is not finished when this happens could it be hanging aorund in the background still running while the User starts another of the same process?  I am trying to figure out how there can be multiple Orders from these Pre-Orders.

Please ask questions so I can help complete if it is not clear.

Thanks,
jimbo99999

Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Are you talking about coding/debugging practices, or religious implications of your choices?

Do you want to ensure that your application can only start a single instance?  What type of "process" application are you talking about (WinForms, Console, Windows service, ...)?

Bob
Avatar of Moother
Moother

i think it's just a matter of time before we have the islamist view on this.

please be patient, it should be worth it as usual.
Avatar of Jimbo99999

ASKER

Moother:

I am not sure what you mena by that.

TheLearnedOne:

Thanks for the leading questions and I appreciate your response.  As far as the coding practices goes, the VB.net code goes as far as toe chack to make sure that the Order has not been created for a Pre-Order.  I think in this situation perhaps we would only want it to be running one instance at a time.  Theoretically I would want 2 people hitting the create button at the same time thus creating the same Orders since they would both "See" that they are not there yet.  

How could this be restricted?  All I could see is that perhaps the .exe was fired up multiple times at the Customer site in Task Manager.   I guess I cannot figure how to isolate down to whether or not a certain
process(Order create) was fired from within the .exe.  

Not sure where to go from here...probably didn't do a good job of explaining.
jimbo99999
1) You usually don't see technical questions cross-posted in the Philosophy & Religion zone, so I think that was a poor attempt at humor.

2) Are you asking for a way to keep multiple people from creating orders at the same time?

Bob
TheLearnedOne:

1) My...bad I saw Philosophy and kind of got it confused with Coding Methodology Thought Process

2) You know in a way whay you said in there kind of is a parallel situation.  What if multiple people
    hit this function at the same time...kind of like a User having multiple instances in the background.

So, grabbing a recordset at the top of the code that includes all Pre-Orders that have not been created into an Order yet might not be a good thing.  What if someone else a econd later started this same process and has the same recordset(cause at the time the Order from the first person might not have been created yet).  

Being that this code/program is from a different Developer, I probably would have put a check in maybe before writing that Pre-Order to an Order "asking" is this Order here, if not then create.  

Bob, how would you handle your statement in 2)?

Thanks again...
jimbo99999
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Jimbo99999 > ) My...bad I saw Philosophy and kind of got it confused with Coding Methodology Thought Process

hmmm, ok, I'm ok with that....
Ok, how do I do that?  
That is a vague statement.  What are you looking for?  Code examples?  Pointers?

Bob
TheLearnedOne:

I was actually answering the the Administrative Comment from WaterStreet.  I did, however, read it wrong.  I thought it said "Remove the...".  Now that I see it says "Removed the..." apparently he removed it.  

Thanks,
jimbo99999
Conceptually, your response made perfect sense.  I will review here to se what needs to be done to utilize that idea.

Thanks again,
jimbo99999