I am developing an application to make maintenance records more useful. The application must be able to accept queries and display the result in numeric form of on a chart. Can you provide a sample code snippet in VBA for querying an MS Excel database?
Sorry, I'm not 100% sure what you're after here. In general, the best approach is to set up Excel to get External data from MSQuery, have it put the data into a table and then have a chart object based upon the tabular data. You can do this (depending upon the Excel version), by choosing "Get External Data" from the "Tools" menu. It is often possible to do this without even writing code, simply by using the query designer tool.
Dig Deeper on .NET Development for SQL Server
Related Q&A from Greg Low
Find how to query in SQL Server to get all database names created by users.
Learn why using the sp_OACreate stored procedure with a SQL Server 2005 trigger, is likely to result in a permissions problem.
Find how to save stored procedure output to the network drive via SQL Server Management Studio.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.