dbTalk Databases Forums  

ActiveX Transformation - beginner

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss ActiveX Transformation - beginner in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MacChojnacki (AT) googlemail (DOT) com
 
Posts: n/a

Default ActiveX Transformation - beginner - 07-12-2006 , 05:26 AM






Hi,

I have a small problem with tranformation.
The code is:

Function Main()
a = DTSSource("ConfQuantity").value
if DTSSource("CancelledConfirmationCounter") = 0 then
DTSDestination("ConfQuantity")=DTSSource("ConfQuan tity")
else
DTSDestination("ConfQuantity")= a *(-1)
end if
Main = DTSTransformStat_OK
End Function

So as you can see it's very simple code which is reversing number when
source is different then 0.
But it's not working. I don't know what I'm doing wrong.
Error shows up when DTSDestination("ConfQuantity")= a *(-1) line is
being executed.

Thanks in advance.

Maciej Chojnacki


Reply With Quote
  #2  
Old   
Davide
 
Posts: n/a

Default Re: ActiveX Transformation - beginner - 07-12-2006 , 06:28 AM






Hello MacChojnacki (AT) googlemail (DOT) com,

Quote:
Hi,

I have a small problem with tranformation.
The code is:
Function Main()
a = DTSSource("ConfQuantity").value
if DTSSource("CancelledConfirmationCounter") = 0 then
DTSDestination("ConfQuantity")=DTSSource("ConfQuan tity")
else
DTSDestination("ConfQuantity")= a *(-1)
end if
Main = DTSTransformStat_OK
End Function
So as you can see it's very simple code which is reversing number when
source is different then 0.
But it's not working. I don't know what I'm doing wrong.
Error shows up when DTSDestination("ConfQuantity")= a *(-1) line is
being executed.
Thanks in advance.

Maciej Chojnacki

What's the error?
Bye




Reply With Quote
  #3  
Old   
MacChojnacki (AT) googlemail (DOT) com
 
Posts: n/a

Default Re: ActiveX Transformation - beginner - 07-12-2006 , 06:46 AM



Error is: The number of failing rows exceeds the maximum specified.
Type mismatch error.

I noticed that this kind of error shows up on every operation with
numbers eg multiply,divide.
So when want to get :
DTSDestination("ConfProductionLaborTime") =
DTSSource("ConfProductionLaborTime")/60
I always get this error.

Please help me.


Reply With Quote
  #4  
Old   
Davide
 
Posts: n/a

Default Re: ActiveX Transformation - beginner - 07-12-2006 , 07:20 AM



Hello MacChojnacki (AT) googlemail (DOT) com,

Quote:
Error is: The number of failing rows exceeds the maximum specified.
Type mismatch error.
I noticed that this kind of error shows up on every operation with
numbers eg multiply,divide.
So when want to get :
DTSDestination("ConfProductionLaborTime") =
DTSSource("ConfProductionLaborTime")/60
I always get this error.
Please help me.

So it' s type-mismatch;
Probaly there are some records in your source object where DTSSource("ConfProductionLaborTime")
has a value not numerical (or not interpreted as numerical) so not divisible
by 60.
What are the Regional Settings of the machine on which DTS are running ?
Consider this example: if your regional setting are English the string
",39" is not considered numerical.
Bye




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.