Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call SQL Server Stored Procedures with parameters,
We have a block of code that looks like this:
With ActiveSheet.QueryTables.Add(Connection:="ODBC;DSN= XXX", Destination:=Range("A1")) .CommandText = "spsReport17" ' Array("SELECT * FROM tblReport17") .Name = "XXX" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = True End With ..CommandText used to just be a 'SELECT * FROM...' statment but we are having to change to Stored Procedures - and this worked ok. However, we now need to pass a single parameter to this Stored Proc. Can anybody tell me the syntax (or even if this is possible) please. I've looked in the help and can't find anything about this. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivotcharts and stored procedures | Charts and Charting in Excel | |||
Can I import SQL Stored Procedures into Excel? | Excel Discussion (Misc queries) | |||
Running sql stored procedures from Excel | Excel Discussion (Misc queries) | |||
Stored Procedures - First Attempt | Excel Programming | |||
Stored Procedure call and passing parameters | Excel Programming |