Unable to execute DTSLookup | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Unable to execute DTSLookup

I have a pretty simple lookup query that returns an error that I can’t figure out. It states that the query has too few parameters (2), but only 1 is required. I’ve investigated every component and everything seems correct. I have another lookup just like this and it works fine. Here is a simple description: I have an Access table with values that have to be loaded into a SQL Server table. I defined a Row Transform task with an ActiveX script. My lookup query is called Test1 and looks like this: SELECT ConveyanceInstrumentId
FROM ConveyanceInstrumentMapping
WHERE (conveyanceinstrument = ?) Here is the transform script: ‘**********************************************************************
‘ Visual Basic Transformation Script
‘************************************************************************ ‘ Copy each source column to the destination column
Function Main()
dtsdestination("ConveyanceInstrumentId") = DTSLookups("test1").Execute(1)
Main = DTSTransformStat_OK
End Function The Execute(1) is just there for testing purposes, but returns the same error as when I reference the field I want to look up. When I test this, an error is returned: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2 Any suggestions or ideas are appreciated.

]]>