Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default OLEDB - INSERT INTO Excel FROM Stored Procedure

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default OLEDB - INSERT INTO Excel FROM Stored Procedure

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default OLEDB - INSERT INTO Excel FROM Stored Procedure

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can Oracle DB Stored procedure be called in MS Excel? Amol Excel Discussion (Misc queries) 1 January 7th 07 10:05 AM
execute stored procedure from excel maxzsim Excel Worksheet Functions 3 May 11th 05 04:58 PM
Getting stored procedure result to excel mkarja[_2_] Excel Programming 9 March 9th 05 12:56 PM
Run a stored procedure in Excel 2K ArthurB Excel Programming 0 February 26th 04 04:46 PM
Passing parameter from Excel to stored procedure? hmmm... Excel Programming 1 July 25th 03 02:59 PM


All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"