Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to insert data in Excel from a *Stored Procedure* using
OLE-DB? I use something like: INSERT INTO [Sheet12$] SELECT * FROM [odbc;Driver={SQL Server};Server=blabla;Database=Northwind;User ID=bla;Password=bla].Orders I'd like to use something like: INSERT INTO [Sheet12$] EXECUTE [odbc;Driver={SQL Server};Server=blabla;Database=Northwind;User ID=bla;Password=bla].GetOrdersProc() Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One alternative is to use ADO to connect to the SQL Server database, create
a recordset based on the stored procedure, and then use the CopyFromRecordset method to insert the data in Excel. The Execute method of the ADO connection object allows you to specify a SQL Server stored procedure. The following KB articles provide more information. http://support.microsoft.com/default...b;en-us;306125 http://support.microsoft.com/default...b;en-us;247412 -- David Lloyd MCSD .NET http://LemingtonConsulting.com This response is supplied "as is" without any representations or warranties. "DevInstinct" wrote in message oups.com... Is it possible to insert data in Excel from a *Stored Procedure* using OLE-DB? I use something like: INSERT INTO [Sheet12$] SELECT * FROM [odbc;Driver={SQL Server};Server=blabla;Database=Northwind;User ID=bla;Password=bla].Orders I'd like to use something like: INSERT INTO [Sheet12$] EXECUTE [odbc;Driver={SQL Server};Server=blabla;Database=Northwind;User ID=bla;Password=bla].GetOrdersProc() Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, but I need to run this server-side. Using automation is not an
option. I can do with the select. I just want to know if there's a way WITH OLE-DB to call a stored proc in the same manner I call the select. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can Oracle DB Stored procedure be called in MS Excel? | Excel Discussion (Misc queries) | |||
execute stored procedure from excel | Excel Worksheet Functions | |||
Getting stored procedure result to excel | Excel Programming | |||
Run a stored procedure in Excel 2K | Excel Programming | |||
Passing parameter from Excel to stored procedure? | Excel Programming |