Solved

writing DB polling application in visual basic 6

Posted on 2011-09-25
4
230 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

734 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