Dtslookup
Jan 15, 2001
I'm having a hard time trying to get my text file import to work. I have a DTS job setup that maps fields etc. I'm having trouble with a field in my destination. This is just a counter field where it just number's the record. I tried doing a DTSLookup to find the max number and add 1 to it for the next record but I'm getting a DTSLookup "Type mismatch" when I run.
Is there an easier way to do this (maybe the property of the destination field) or what am I doing wrong in the DTSLookup.
View 1 Replies
Apr 18, 2006
Hello all,
Does any one know how I can capture the sql error message when the sql statement in DTSLookup step fails?
e.g.
I have this sql statement in a DTSLookup task:
insert into table1 (col1) values (?); select @@ERROR
Let's say for some reason (bad data), my insert statement fails and I want to know why. So I added "select @@ERROR" to capture the error. However, from the Lookup window, I cannot save the result of @@ERROR to a global variable or to an output parameter. I want to log this error in the next step that handles the OnFailure workflow, but I don't know how.
Can someone help please?
Thanks,
K.
View 1 Replies
View Related
Feb 22, 2006
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.
View 2 Replies
View Related