Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 issue with DTSLookups

Author  Topic 

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2004-11-08 : 19:00:38
This is the Vbscript I have and its going on in a continuous loop......

My DTSlookups is like this

select file_id from tbl_file_detail where file_id=?

Here is the VB Script that I have used.Still its giving problems


Function Main()

Dim get_id

get_id = DTSLookups("avoid_duplicates").Execute(DTSSource("file_id").value)


IF ISEMPTY(get_id) THEN

DTSDestination("file_id") = DTSSource("file_id")
DTSDestination("emp_number") = DTSSource("emp_number")
DTSDestination("file_type") = DTSSource("file_type")
DTSDestination("mime_type") = DTSSource("mime_type")
Main = DTSTransformStat_OK
ELSE
Main =DTSTransformStat_SkipRow

END IF


End Function

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2004-11-08 : 21:11:59
The funny thing is If I comment out DTSDestination("mime_type") = DTSSource("mime_type") then it works..I don't know whats happening
Go to Top of Page

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2004-11-08 : 22:04:29
another funny thing is its not just if I comment "mime_type"...its allowing only 3 fields to get saved...if I comment any one it works....otherwise its running forever....
Go to Top of Page
   

- Advertisement -