By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

How to automatically refresh report/datagrid when new entry is entered

100+
P: 284
I am using VB6 and SQL Server 2000.
i want to know how to do this

we have two/three computers working in our office sql server is installed in maincomputer where we only see the report do not enter data.

now situaiton is i want that when the clients from the other computer update or enter data in the table even if the report or datagrid is open
in the maincomputer it should refresh autmatically.

for e-g suppose we recive an order and on the maincomputer a report is open which shows todays order to be deliver then the data of new order is entered from other computer the on the main computer daily order report should autmatically be refresh and show the current order list .

i donot know how to refresh datareport/data on datagrid automatically when user enter the data

i also want to give time stamp how the that the order has been placed
plz tell me both answers

thanks
Feb 8 '08 #1
Share this Question
Share on Google+
3 Replies


debasisdas
Expert 5K+
P: 8,127
Try to refresh recordset at a particular time interval.

Once the other user commits the changes will be refreshed in all the systems.
Feb 8 '08 #2

QVeen72
Expert 100+
P: 1,445
Hi,

If your Orders Recordset is huge, then Refreshing for at regular intervals (5 mins or so..) may become a tedious and high network traffic. What you can do is Create a new Table with one Field, and Populate that Field With the Last Order Number. This you have to do When you are saving the New Order Entry.
This table should always have One Record -OneField(Last Order Number) at any given time..

In Form_load of Datagrid Form, Query for that Number and Save it in FormLevel Variable. Now Start (Enable) a Timer in FormLoad. For every 5 mins, Check for that Field in TempTable. If Your FormVariable <> TempTable.FieldName, Then ReFresh the DataGrid/Datreport.. along with a message to user.
This logic will prevent you from un-necessarily opening a huge recordset at regular Intervals..
Feb 8 '08 #3

100+
P: 284
thanks i will try it




Hi,

If your Orders Recordset is huge, then Refreshing for at regular intervals (5 mins or so..) may become a tedious and high network traffic. What you can do is Create a new Table with one Field, and Populate that Field With the Last Order Number. This you have to do When you are saving the New Order Entry.
This table should always have One Record -OneField(Last Order Number) at any given time..

In Form_load of Datagrid Form, Query for that Number and Save it in FormLevel Variable. Now Start (Enable) a Timer in FormLoad. For every 5 mins, Check for that Field in TempTable. If Your FormVariable <> TempTable.FieldName, Then ReFresh the DataGrid/Datreport.. along with a message to user.
This logic will prevent you from un-necessarily opening a huge recordset at regular Intervals..
Feb 8 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.