Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Executing Stored Procedure | Excel Programming | |||
using WScript.CreateObject("Wscript.Shell | Excel Programming | |||
execute stored procedure | Excel Programming | |||
Run a stored procedure in Excel 2K | Excel Programming | |||
Execute stored procedure using DAO | Excel Programming |