![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to call a lookup from my ActiveX script [SQL Server 2000]. Ideally, I want to call a SQL function I wrote and supply parameters for each row I am importing from a CSV file to retrieve a custom value that will be used in my script. However, it looks like the only way I can do this is by writing a second function that returns a TABLE and simply is a wrapper to my original function. I can't determine how to supply parameter values to this function call. For a general table lookup, I use: SELECT column1 FROM mytable WHERE (column2 = ?) And then call it like this in my ActiveX script: Dim myVariable myVariable = DTSLookups("GetSomeValue").Execute(myInputValue) However, when I use similar syntax for the function lookup: SELECT function_column FROM mytablefunction (?, ?, ?) mytablefunction I get the helpful error message, "ADO error: Syntax error or access violation." when I try to click OK in the Lookup dialog. How do I write my lookup so that I can supply parameter values at run-time from my ActiveX script? TIA, Ryan |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |