DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh
DataGridView automatic refresh DataGridView automatic refresh
DataGridView automatic refresh
Go Back  Xtreme Visual Basic Talk > > > DataGridView automatic refresh


Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2006, 01:22 PM
dentis2l dentis2l is offline
Newcomer
 
Join Date: Sep 2006
Posts: 2
Default DataGridView automatic refresh


Hello,

I am building a windows application. I know how to load the data manually using dataadapter and dataset. I was wondering if there is a way to synchronize an sql server table with a datagridview. When someone updates the database, the content of the dataview should be automatically refreshed in my form.Is it possible to have the datagrid updated automatically without triggering the manual update every ‘n’ seconds?

Thank you for you time,
Dent
Reply With Quote
  #2  
Old 09-20-2006, 02:21 PM
wayneph's Avatar
waynephDataGridView automatic refresh wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

What version of SQL are you using? SQL Server 2005 has Notification Services that allow you to subscribe to data. SQL 2000 has it as an Add-On to a lesser extent as well.
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
  #3  
Old 09-20-2006, 10:37 PM
dentis2l dentis2l is offline
Newcomer
 
Join Date: Sep 2006
Posts: 2
Default

Hello,

Thank you for your reply.
I am using Sql Server 2005 Express.
Reply With Quote
  #4  
Old 09-21-2006, 08:28 AM
wayneph's Avatar
waynephDataGridView automatic refresh wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

Take a look at the System.Data.SqlClient.SqlDependency class. It is supposed to allow you to use Notifications from your .NET apps.

Here's a guide that explains it a lot better than I could: http://msdn2.microsoft.com/en-us/library/a52dhwx7.aspx
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh DataGridView automatic refresh
DataGridView automatic refresh
DataGridView automatic refresh
 
DataGridView automatic refresh
DataGridView automatic refresh
 
-->