Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling UDF in DTS package
Message
From
16/11/2006 07:15:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
01168936
Message ID:
01170196
Views:
10
>Hi Cetin. Got the chance to try out your suggestion and unfortunately, it did not work. It produces the following error:
>
>
>The number of failing rows exceeds the maximum specified.
>Error code: 0
>Error Source=Microsoft VB runtime error
>Error Description: Object required: 'udr1x'
>
>Error on line 15
>
>This is line 15:
>
>DTSDestination("SourceCode") = udr1x.dbo.getsourcecode(DTSSource("input_file_name"))
>
>
>The other lines are simple DTSDestination(fieldname) = DTSSource(fieldname) so they do not present any problems and also why I did not list them here.
>
>The DTSSource("input_file_name") field contains different elements of data which need to be split out into separate fields. The elements are not static within the field so something like a substr function is not useful.
>
>I tried storing the input_file_name in a variable and calling the UDF pointing it to the variable instead of the source field but received the same error msg.
>
>I also attempted without the high level qualifier, but got the same error only the object required was now 'dbo'. Guess SQL or VB or DTS, whichever one is complaining will not allow this technique. Shame, because the UDF has been tested successfully from within the UDR1X database as well as other db's on the server. Seems odd that I would have to redevelop the UDF as part of the DTS package in order to get it to work, which I did and it does. Would be nice to be able to call it so maintenance is better controlled.
>
>Thanks for your help anyway. I appreciate it.
>
>Vince

Vince,
I just tried it and it worked for me. However for data insetad of copy I chose specify query and wrote a select statement with function in it. It looks like:

select *, dbo.fn_MyFunction(myInputCol) from myTable

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform