dbTalk Databases Forums  

Invalid Number of Paramters from C# Custom Task

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


Discuss Invalid Number of Paramters from C# Custom Task in the microsoft.public.sqlserver.dts forum.



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

Default Invalid Number of Paramters from C# Custom Task - 07-08-2003 , 11:39 AM






Hi
I keep getting the error description of "Invalid Number of
Paramters" when I try to re-open / execute my save DTS package that
contains a custom task which work fine when I first start my dts
package. I also get this from an example custom task which I download
from Microsoft site (which uses the UI). I come across this problem
before when writing customs task VB6 which was I had read only
properties but none of my .Net custom tasks do. Has anyone easy come
across this problem and be able to solve it ?

Reply With Quote
  #2  
Old   
Gert E.R. Drapers
 
Posts: n/a

Default Re: Invalid Number of Paramters from C# Custom Task - 07-08-2003 , 06:26 PM






Do you implement CustomTaskUI or not ?

If you don't you need to work around the fact that ToString is getting
exposed as a COM method, since it is a method on System.Object which is
where every object derives from.

Workaround for that problem is to override ToString like this:

<ComVisible(False)> _
Public Overrides Function ToString() As String
Return MyBase.ToString()
End Function

GertD (AT) SQLDev (DOT) Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2003 All rights reserved.

"Steve Wright" <Steve.Wright (AT) conchango (DOT) com> wrote

Quote:
Hi
I keep getting the error description of "Invalid Number of
Paramters" when I try to re-open / execute my save DTS package that
contains a custom task which work fine when I first start my dts
package. I also get this from an example custom task which I download
from Microsoft site (which uses the UI). I come across this problem
before when writing customs task VB6 which was I had read only
properties but none of my .Net custom tasks do. Has anyone easy come
across this problem and be able to solve it ?



Reply With Quote
  #3  
Old   
Gert E.R. Drapers
 
Posts: n/a

Default Re: Invalid Number of Paramters from C# Custom Task - 07-08-2003 , 06:33 PM



Sorry your are using C#

// prevent ToString from getting exposed as a COM method
// not required if CustomTaskUI is implemented,
// added for completeness of the sample
//
[ComVisible(false)]
override public string ToString()
{
return base.ToString();
}

GertD (AT) SQLDev (DOT) Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2003 All rights reserved.

"Gert E.R. Drapers" <GertD (AT) SQLDev (DOT) Net> wrote

Quote:
Do you implement CustomTaskUI or not ?

If you don't you need to work around the fact that ToString is getting
exposed as a COM method, since it is a method on System.Object which is
where every object derives from.

Workaround for that problem is to override ToString like this:

ComVisible(False)> _
Public Overrides Function ToString() As String
Return MyBase.ToString()
End Function

GertD (AT) SQLDev (DOT) Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2003 All rights reserved.

"Steve Wright" <Steve.Wright (AT) conchango (DOT) com> wrote in message
news:b79fd2cf.0307080839.7274816b (AT) posting (DOT) google.com...
Hi
I keep getting the error description of "Invalid Number of
Paramters" when I try to re-open / execute my save DTS package that
contains a custom task which work fine when I first start my dts
package. I also get this from an example custom task which I download
from Microsoft site (which uses the UI). I come across this problem
before when writing customs task VB6 which was I had read only
properties but none of my .Net custom tasks do. Has anyone easy come
across this problem and be able to solve it ?





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.