LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Importing Data from a Stored Procedure (SQL SErver)

Hi there,

I am trying to import data from a Stored procedure which has a Select
Statement in it into Excel.
I could also exec the select Statement out of Excel (VBA), that would be ok
for me also.

I am struggling in setting up the Connection and the Recordset Objects and
then call the CopyfromRecordset method.

For example:
I have in my code:
Dim cnPubs As ADODB.Connection
Set cnPubs = New ADODB.Connection

and I get the following Error while running the Macro: Compile Error:
User-Defined type not defined

I have to admit that I am not that good in ADODB Connection building and
Recordset operations...

I would appreciate your help big time.

Thanks,
Martin


 
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
Data return from SQL Stored procedure... Jonathon Shull Excel Discussion (Misc queries) 0 July 29th 08 04:25 PM
Extract data from Stored procedure anu_manu Excel Discussion (Misc queries) 0 February 15th 06 02:49 PM
How do I access data stored in a SQL server for vlookup function? M.Heer Excel Worksheet Functions 8 May 12th 05 09:51 PM
How can I grab data from a SQL Server stored procedure Sam Excel Programming 3 December 4th 03 03:38 PM
Execute stored procedure using DAO sapta wijaya Excel Programming 0 September 29th 03 04:24 AM


All times are GMT +1. The time now is 08:40 AM.

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"