|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
DTS Beginner question
In order to learn how to create some DTS packages I created a text file to transfer to a test table. I added text file and SQL Server connections to my package and a transform data task connecting them. A simple 1-1 transfer of each column worked fine. Then I added some test code to try making modifications during the transfer. The simplest code, for example:
Function Main() DTSDestination("streetno") = "50" End Function gives me a type mismatch runtime error on DTSDestination. The streetno column is an integer and furthermore any combination of source/destination columns and data does the same thing. Please help? Thanks, Wayne |
|
#2
|
||||
|
||||
|
If the streetno column is an integer, then why are you passing it a string?
Code:
This is a string
DTSDestination("streetno") = "50"
This is an integer
DTSDestination("streetno") = 50
Notice the difference? |
|
#3
|
|||
|
|||
|
Bad example. My latest attempt was to try a string and I just copied the code. However that's exactly the problem. I get the same result no matter how it's coded, be it a number, a string or whatever.
Wayne |
|
#4
|
|||
|
|||
|
Try this out
I think you have to return something like:
Code:
Main = DTSTransformStat_OK End Function Right before you have the "End Function" line in your code. I think the "type mismatch" error is due to the fact that your ActiveX function doesn't seem to be returning any values back to the main process. Hope this helps, Steve |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > DTS Beginner question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|