dbTalk Databases Forums  

Activex Scripting : Function Not found Error

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


Discuss Activex Scripting : Function Not found Error in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Help
 
Posts: n/a

Default Activex Scripting : Function Not found Error - 12-02-2004 , 02:40 PM






I have a ActiveX Scripting in DTS package.

When i run the package it gives an error msg,
"Activex Scripting : Function Not found"

When i execute the same file from my local machine as a .vbs script, it
runs fine. I am puzzled.
Please help if i am neglecting something.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Activex Scripting : Function Not found Error - 12-02-2004 , 02:58 PM






So it does not work in DTS but does outside of DTS?

and what is the function?

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Help" <help (AT) devdex (DOT) com> wrote

Quote:
I have a ActiveX Scripting in DTS package.

When i run the package it gives an error msg,
"Activex Scripting : Function Not found"

When i execute the same file from my local machine as a .vbs script, it
runs fine. I am puzzled.
Please help if i am neglecting something.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #3  
Old   
Robert Davis
 
Posts: n/a

Default RE: Activex Scripting : Function Not found Error - 12-02-2004 , 02:59 PM



To what function is it referring?

Robert.

"Help" wrote:

Quote:
I have a ActiveX Scripting in DTS package.

When i run the package it gives an error msg,
"Activex Scripting : Function Not found"

When i execute the same file from my local machine as a .vbs script, it
runs fine. I am puzzled.
Please help if i am neglecting something.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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

Default Re: Activex Scripting : Function Not found Error - 12-02-2004 , 03:10 PM



Thats right. It does not work in DTS.
I scheduled as a Job also thinking its related to permissions of the
server. But it gives an error in that also. I have posted my code in the
previous post.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #5  
Old   
Help
 
Posts: n/a

Default Re: Activex Scripting : Function Not found Error - 12-02-2004 , 03:10 PM



The function is to get only the required rows from a source file.
Here's my code..

Main()

Function Main()
Dim fso
Dim sTempFileName
Dim fReutersWM11
Dim fInputWM11
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim sLine, sValid

Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists("\\MFTP_SERVER\MFTP_PROD\Input\GECA P.csv") = true
Then

Set fReutersWM11 =
fso.opentextfile("\\MFTP_SERVER\MFTP_PROD\Input\GE CAP.csv" , ForReading,
true)

sTempFileName ="\\MFTP_SERVER\MFTP_PROD\Input\TempGECAP.csv"
Set fInputWM11 = fso.opentextfile(sTempfileName,ForAppending,True)



'Readline line by line from source
Do while fReutersWM11.AtEndofline <> true
sLine = fReutersWM11.Readline
sValid = Left(sLine,3)
'If Starts with Datevalue then Valid
If sValid = "200" then
'Writeline to TempGECAP file
fInputWM11.WriteLine sLine
End if
Loop
fReutersWM11.close()
fInputWm11.close()

Else
Main = DTSTaskExecResult_Failure

End if


Main = DTSTaskExecResult_Success
End Function





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Activex Scripting : Function Not found Error - 12-02-2004 , 03:26 PM



What's the Main() stuck out on its own there for?

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Help" <help (AT) devdex (DOT) com> wrote

Quote:
The function is to get only the required rows from a source file.
Here's my code..

Main()

Function Main()
Dim fso
Dim sTempFileName
Dim fReutersWM11
Dim fInputWM11
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim sLine, sValid

Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists("\\MFTP_SERVER\MFTP_PROD\Input\GECA P.csv") = true
Then

Set fReutersWM11 =
fso.opentextfile("\\MFTP_SERVER\MFTP_PROD\Input\GE CAP.csv" , ForReading,
true)

sTempFileName ="\\MFTP_SERVER\MFTP_PROD\Input\TempGECAP.csv"
Set fInputWM11 = fso.opentextfile(sTempfileName,ForAppending,True)



'Readline line by line from source
Do while fReutersWM11.AtEndofline <> true
sLine = fReutersWM11.Readline
sValid = Left(sLine,3)
'If Starts with Datevalue then Valid
If sValid = "200" then
'Writeline to TempGECAP file
fInputWM11.WriteLine sLine
End if
Loop
fReutersWM11.close()
fInputWm11.close()

Else
Main = DTSTaskExecResult_Failure

End if


Main = DTSTaskExecResult_Success
End Function





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #7  
Old   
Help
 
Posts: n/a

Default Re: Activex Scripting : Function Not found Error - 12-02-2004 , 04:10 PM




I removed the Main(). And Put in a Option Explicit.
Still gives same error.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #8  
Old   
Robert Davis
 
Posts: n/a

Default Re: Activex Scripting : Function Not found Error - 12-03-2004 , 06:57 PM



Try changing close() to just close, with no parenthesis.

Robert.

"Help" wrote:

Quote:
I removed the Main(). And Put in a Option Explicit.
Still gives same error.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #9  
Old   
Darren Green
 
Posts: n/a

Default Re: Activex Scripting : Function Not found Error - 12-07-2004 , 07:25 AM



In message <uxhwAvL2EHA.2676 (AT) TK2MSFTNGP12 (DOT) phx.gbl>, Help
<help (AT) devdex (DOT) com> writes
Quote:
I removed the Main(). And Put in a Option Explicit.
Still gives same error.



Check that the entry function in the ActiveX Script Task UI is valid,
normally this is Main.



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.