Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Import Text File and Update Records

Status
Not open for further replies.

Bell1991

Programmer
Aug 20, 2003
386
US
I am attempting to import a text file and update records.

The text file has:
col001 ->numID
col003 ->Y/N

DB Table has:
numID
Accepted (bit field) - updated based on col003
Declined (bit field) - updated based on col003

Here is my code
Code:
Function Main()
	Select case("Col001")
		Case "Update"
			If ("Col003" = "Y") Then
				DTSDestination("Approved") =  1
				DTSDestination("Declined") = 0
			else
				DTSDestination("Approved") = 0
				DTSDestination("Declined") = 1
			end if
	
	Main = DTSTransformation_UpdateQuery
	End Select
End Function



I am getting the following error:
Code:
Active Script Transform Server "DTSTransformation_1" scrip function main retunred an invalid DTSTransaformStatus Value, or an ActiveX Script did not return an integral type.  No further work will be done by the DataPump

Any ideas?

 
I had a quick look at one of our DTS tasks and I think there could be a problem with your "col001" and "col003" references

On our DTS's we refer to them as:

DTSSource("Col001")
DTSSource("Col003")

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top