Excel Automation - OLEDB Support
From: Rajesh G (rgodavarthi_at_hotmail.com)
Date: 02/26/04
- Next message: oye: "ole automation"
- Previous message: Jim Jackson: "Re: Find & Replace formatting in Word"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 26 Feb 2004 10:28:04 -0800
All,
I am working on a project in C# .Net, which allows user to create a query in
Winform and Export the data to Excel and then User can refresh the data
whenever needed.
My data source is MS SQL Server.
Here is the code snippet:
m_objQryTables = m_obj***.QueryTables;
m_objQryTable =
(Excel._QueryTable)m_objQryTables.Add("OLEDB;Provider=SQLOLEDB;Data
Source=XXX;Initial catalog=Northwind;user id=sa;password=;", m_objRange,
"Select * From Employees");
My Question:
- Is there anyway we can use OLEDB provider to connect to MS SQL Server..?
Any current versions or future versions of Excel support this...?
I found OLEDB provider for only Jet Engine in Excel, looks like all other
datasources can be accessd only through ODBC.
Any Ideas ..
Thanks for your time.
-- Rajesh in Christ.
- Next message: oye: "ole automation"
- Previous message: Jim Jackson: "Re: Find & Replace formatting in Word"
- Messages sorted by: [ date ] [ thread ]