Refreshing data from ODBC automatically?
Greetings,
I have a spreadsheet containing a macro that fills in cells with data fetched from an SQL database via ODBC. How do I get the data to refresh automatically if the source SQL data changes? For example: Someone opens the sheet, the macro fires, and the sheet is filled with data. Then, someone else adds data to the source SQL table, and... I'd like the sheet to update automatically. I guess this would involve a sort of persistent ODBC connection, but I have no idea how to go about this. Thanks for any suggestions! -John --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003 |
Refreshing data from ODBC automatically?
John
I think the best you can do is refresh the querytable when the workbook opens, then refresh every x minutes. If nothing has changed, then the workbook won't change and you only lose a little processing time. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "John E.P. Hynes" wrote in message ... Greetings, I have a spreadsheet containing a macro that fills in cells with data fetched from an SQL database via ODBC. How do I get the data to refresh automatically if the source SQL data changes? For example: Someone opens the sheet, the macro fires, and the sheet is filled with data. Then, someone else adds data to the source SQL table, and... I'd like the sheet to update automatically. I guess this would involve a sort of persistent ODBC connection, but I have no idea how to go about this. Thanks for any suggestions! -John --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003 |
All times are GMT +1. The time now is 01:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com