Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

writing DB polling application in visual basic 6

Posted on 2011-09-25
4
Medium Priority
?
249 Views
Last Modified: 2012-05-12

I want to write a polling application in visual basic 6 which sits on windows taskbar on client desktop (winxp). This application should poll the db periodically and retrives the stock which has gone below the min stock level and displays on the grid.

Can some expert let me know how to accomplish this
0
Comment
Question by:venkataramanaiahsr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 22

Expert Comment

by:Paka
ID: 36596656
You will have to provide more info if we are to help you.  What does the structure of the SQL database look like?  Does the database contain the stock and min level and another database contain the live data (or does it come in by another source).  Basically, you will have VB pass a SQL query to the SQL database (such as "select * from stockdata where livedata.stockprice < stockdata.minprice").  Displaying this data in a data-aware grid is pretty straightforward.  

Please provide the info requested and we should be able to help you further.
0
 

Author Comment

by:venkataramanaiahsr
ID: 36597581

The DB is Sql 2005.  For each item  min stock position is defined. I can retrieve the  current stock from soh table for each item by comparing it with min stock level for that particular item and display it in the grid. But my question is, i want to have vb application sitting on windows task bar (minimized) and continously poll the DB for this data at perioidic intervals and refresh the grid and give a pop up msg to the user of this data. I would be thankful to the experts if you could let me know how to develop this kind of application in VB.
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 2000 total points
ID: 36598763
in vb you will use a timer control to wake up and perform the query against the database...

if you have a large number of stock items and the number falling below the "reorder" level is generally small then it maybe a good strategy to implement a trigger which would write the reorder situation to another table which the vb app would then query.. the actual mechanic of the process will depend on the business strategty and business rules that your organisation persues...

e.g. how do you record future demand?  do you let stock levels go negative or handle it on the customer order table...
 
     ... how what are you using to track "ordered" stock to know if you actually need to place further restocking orders?
      ... are overstock orders passed to other warehouses in the organisation for fulfilment?

0
 
LVL 14

Expert Comment

by:VBClassicGuy
ID: 36598909
In its simplest form, seems like a no-brainer. Like LowFat said, just poll the DB on a timer and update your grid. If an item is below min stock levels, display another form with its own timer that displays the info for a short period of time then unloads itself.

But you probably need more advanced functionality like LowFat is describing. If so, study his response thoroughly and work with him on this.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

704 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