dbTalk Databases Forums  

Custom DTS Task does not persist checkbox values

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


Discuss Custom DTS Task does not persist checkbox values in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
karenmiddleol@yahoo.com
 
Posts: n/a

Default Custom DTS Task does not persist checkbox values - 06-11-2005 , 02:07 AM






I have defined a DTS custom task with the following declarations for
the DTS Custom Task class

'Required for CustomTask
Implements DTS.CustomTask

'Required for CustomTask with User Interface
Implements DTS.CustomTaskUI

'Required Custom Task Properties
Public Description As String
Public Name As String
Public pFile1 As String
Public pFile2 As String
Public pFile3 As String
Public pCons As Boolean
Public pDrp As Boolean


Description, name, File1, file2 and file3 all are strings the values in
them are persisted by the custom task

But I also have two check boxes chkCons and chkDrop on the form which I
persist into pCons and pDrp and then when the form load happens I
restore the values in pCons and pDrp into the checkboxes but they seem
not get the values back.

I tried converting by encoding the boolean outcome of the checkbox into
a string and changing pCons and pDrp as string and despite it pCons and
pDrp will never persist.

Not sure what is wrong here. I would appreciate if somebody can clarify
it.

Thanks
Karen


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

Default Re: Custom DTS Task does not persist checkbox values - 06-13-2005 , 07:22 AM






The form will need to have access to the task object to read the properties
during the initial loading of the form and then set the properties, usually
on form closing, or OK click.

How have you approached this? It isn't clear from your post.

There is a VB6 sample of how you can approach this here-

Sample Custom Task Project
(http://www.sqldts.com/default.aspx?284)

In .Net I'd probably change the form constructor to accept the task, instead
of using the TaskObject property, but that is more my preference than a
requirement.

--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

<karenmiddleol (AT) yahoo (DOT) com> wrote

Quote:
I have defined a DTS custom task with the following declarations for
the DTS Custom Task class

'Required for CustomTask
Implements DTS.CustomTask

'Required for CustomTask with User Interface
Implements DTS.CustomTaskUI

'Required Custom Task Properties
Public Description As String
Public Name As String
Public pFile1 As String
Public pFile2 As String
Public pFile3 As String
Public pCons As Boolean
Public pDrp As Boolean


Description, name, File1, file2 and file3 all are strings the values in
them are persisted by the custom task

But I also have two check boxes chkCons and chkDrop on the form which I
persist into pCons and pDrp and then when the form load happens I
restore the values in pCons and pDrp into the checkboxes but they seem
not get the values back.

I tried converting by encoding the boolean outcome of the checkbox into
a string and changing pCons and pDrp as string and despite it pCons and
pDrp will never persist.

Not sure what is wrong here. I would appreciate if somebody can clarify
it.

Thanks
Karen




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.