Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2007, 08:42 PM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default DTS VB ActiveX Embarrassing newbie question.



Hi all, I’m really sorry to trouble you with such a trivial request. I’ve been doing programming on and off for 5 years or so, but not much exposure to VB.

I’m trying to implement a VB ActiveX routine in DTS SQL Server 2000. What I’d like to do, which I’m having problems with, is create a function that takes two string arguments, does some processing, and returns a string.

I’ve created an example in VB .Net which works, but I can’t get it to work on SQL Server 2000 DTS. I guess it is something to do with a change between the two versions of the languages. However, I haven’t been able to find one example of a function (plenty of subs but no functions).

Anyway, the failing code is below:

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()
Dim Resp as String
  Set Resp = Hello (“Param1”,”Param2”)
    Main = DTSTaskExecResult_Success
End Function

Function Hello (ByVal MyVar1 as String, ByVal MyVar2 as String ) as String
 Hello= "Hello"
End Function

I get an error on line 10 (the line starting Function Hello (ByVal…

Has anyone got any ideas what I’m doing wrong (apart from program in a language I clearly know nothing about!)?

I genuinely appreciate any feedback.

Many thanks.



Well if a reboot doesn't fix it, I don't know what will!
 
Old April 11th, 2007, 05:58 PM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello? Anyone? Here is your chance to make yourself feel better by proving how rubbish I am!

Well if a reboot doesn't fix it, I don't know what will!
 
Old April 12th, 2007, 03:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

But, you haven't posted the ERROR that you got on Line 10. How about posting that?

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
DTS Visual Basic ActiveX Script jemacc SQL Server DTS 4 November 28th, 2007 06:11 PM
DTS and ActiveX VB Script gscott SQL Server DTS 6 May 16th, 2007 07:38 AM
DTS Problem with ActiveX Script testsubject SQL Server DTS 1 December 23rd, 2005 05:11 PM
CDONTS and ActiveX in a DTS Package Hal Levy SQL Server 2000 0 May 18th, 2005 01:25 PM
newbie vb.net question dib VS.NET 2002/2003 4 February 5th, 2004 04:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.