Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2007, 09:26 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default VB Project Solution Ideas?

I have a business project I have been working on for several days. I am fairly new to VB so I need some good advice on how to approach the solution.

Our company is engaged in producing asphalt. Asphalt is produced and trucked to the job site. At job site the asphalt is consumed. We need to be able to compare tonnage that have been produced at the plant to tonnage that has been consumed at the job. We need to do this by date and job number.

1. Asphalt plants (8 of them) run on Advantage data base. Each plant has its own data base containing a SalesTicket table that contains asphalt produced.
2. Job site runs on sequel server and consumption is recorded daily wireless
3. User will be able to compare tonnage produced (at plant) and tonnage consumed at job. There could be the case that tonnage is produced and never consumed or tonnage been consumed with no record of being produced.
4. User will be able to view tonnage by date and job and selecting data from one or more plants.
5. If user selects more than one plant I need to connect remotely to multiple plants.
6. The finished display should be something like this:
Date | Job | Asphalt Produced | Job Consumed

So, how can I best consolidate all the information from plants and compare to what’s been consumed at the jobs? I tried to use temp table in a sp but that does not work since I call the sp multiple times. I need to be able, somehow, to build a table with all the plant information and then compare to job information.

Any good ideas????


 
Old December 7th, 2007, 01:31 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you gathering all the data into a central database?

In #2, you say "Job site...". Presumably there is more than 1 job site. If so, are these job sites using the same system or does each site have its own system?

-Peter
 
Old December 7th, 2007, 01:40 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Peter:
The Job site runs on sequel server and uses the same data base for all job sites ie a single table.
I am already bringing in data from all the plants into a single data set, but from here I'm not sure where to go go .... cal I call a sp and dump my data set into a temp table and then compare the temp table against the job site table?


 
Old December 8th, 2007, 12:20 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

It would make sense to me to bring all the plant data into a permanent table then you can just query the two tables to make your comparisons.

-Peter
 
Old December 10th, 2007, 08:58 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Yes I could use a permanent table except for if several users run the prgram at same time I could get a conflict. Is there a way to lock a table for update from others users while is use?

 
Old December 10th, 2007, 11:34 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you are doing this all in SQL Server then you don't need to worry about that. SQL Server can handle lost of concurrent connections and actions against the same tables. The problem you are more likely to encounter would be when you are trying to update the same record simultaneously. These kinds of problems fall under the "concurrency management" category. However, you are dealing with what I would consider mostly static data in that your plants and job sites are adding data but not changing existing data. Then you are simply looking to query the existing data.

You'll need to devise a data scheme such that data coming from two sources (2 plants or 2 job sites) won't conflict. Without knowing your current schema I can't say whether this will ever actually happen. But consider this scenario: You have stated that your plants run separate systems. There is a SalesTicket table. Presumably there is some record ID that numbers records. Two plants will likely have records with the same ID but they are certainly different records. In your central system you'll need to further identify the combined records to eliminate ID conflict. This would be easily accomplished with an additional column: PlantID.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a Project/Solution smsteven BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 July 22nd, 2006 01:52 AM
Solution Excel's can't find the project or library Born2BFree Excel VBA 0 October 21st, 2005 11:49 AM
Cannot open folder in VS 2005 solution project digi_digo VS.NET 2002/2003 0 August 31st, 2005 02:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.