Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Wscript and stored procedure

Hi there


I start understanding using the select statement to fillup my Excel sheet.

I do some thing like this:

..
Set objXL = WScript.CreateObject ("Excel.Application")
..
Set objWb2 = objXL.ActiveWorkBook.WorkSheets(1)
..
Dim cnn,rs,sql
Set cnn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
cnn.Open "Provider=SQLOLEDB; Data Source=serveur3; Initial Catalog=my_db;
User ID=xxx;Password=yyy"
rs.Open "SELECT a,b,SUM(c) AS c1 From MYTABLE Where a=10 & " Group BY
a,b",cnn,3,3,&H0001
Do While Not rs.EOF
objWb2.Cells(i, 1) = rs("a")
objWb2.Cells(i, 2) = rs("b")
objWb2.Cells(i, 3) = rs("c1")
rs.MoveNext
i = i + 1
Loop


Now I would like to know if there is some like this for stored prodedures?


Thanks in dfavance for your help.

Best regards

Ralf


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
Executing Stored Procedure Jenise Excel Programming 1 October 6th 06 03:10 AM
using WScript.CreateObject("Wscript.Shell John Keith[_2_] Excel Programming 3 August 30th 05 07:20 PM
execute stored procedure Mark Goldin Excel Programming 3 April 7th 04 03:03 PM
Run a stored procedure in Excel 2K ArthurB Excel Programming 0 February 26th 04 04:46 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 01:29 AM.

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

About Us

"It's about Microsoft Excel"