borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (newbie needs vb.net help)Next Topic (print line by line) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : Refresh Database
Poster Message
rusdyrip
Level: Protégé

Registered: 22-11-2004
Posts: 4

Ads by Lake Quincy Media
icon Refresh Database

i have a problem and it's hard to explain but don't know the solution for many years,pls help me...

A is viewing database from datagrid.
after that
B inserting a new data to database from different computer.
A still looking datagrid from database before updated.

if he don't click refresh or using timer how can the datagrid automatically refresh the data from database without using button or timer.
i don't like using timer cause it eat resources a lot.

thx
sorry bad english

Ads by Lake Quincy Media
28-06-2009 at 04:49 AM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 1060
icon Re: Refresh Database

Hi
There is no way for you to do this without a timer, unless the database informs your application that a record has changed.
I have seen this in n-tier apps, where updates/requests from the client go into a cache. The client application connects to this cache - NOT to the database. the client application also registers for events in the cache (like "Supplier added" and such).
The net result usually is that the grid refreshes anyway, thereby resulting in a complete download from the cache/datasource.
Timers do not consume much in the way of resources, you can create your own static Timer which means your application has a single timer object. Your aplication then uses this Timer object not the windows.forms one

Hope this helps
Kieron


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

06-09-2009 at 03:23 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : Refresh Database
Previous Topic (newbie needs vb.net help)Next Topic (print line by line) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder