Showing posts with label exist. Show all posts
Showing posts with label exist. Show all posts

Thursday, March 22, 2012

Custom task database connection

I'm developing a custom error task for SSIS. I've got a couple of existing OLE DB connections that exist in the Connection Manager. I want a drop down to be displayed in the Custom Task dialogue properties where the user can select one of the databases from the Connection manager.

2 questions:
1. How can i get the list of OLE DB databases in the properties dialogue?
2. Does anyone have a code sample on accessing a database like that within the custom component?Try this post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=122993&SiteID=1

I don't think you can use an OLE-DB connection directly in managed code. You may (I haven't tried) be able to read off the connection string and use that to create your own ADO.net connection. I have been using ADO.Net connections myself, normally SQL, which gives you a SqlClient.SqlConnection object.

|||Hi Darren,

I don't understand how the IDtsTaskUI.Initialize one ties in here? Also, do you have to tie in the connections within the Acquire Connection method?|||If you have a custom UI for your task then you will have implemented IDtsTaskUI.Initialize in the class that implements IDtsTaskUI.

You call AcquireConnection on the connection you want to get the real connection object. For a file connection that is just a string of the filename, for an ADO.NET connection type SQL, that is a SqlConnection. You would call this in your UI, and also at run-time in the Execute method.

Friday, February 17, 2012

Custom Assembly

Having problems with the <CustomAssemblies> attribute in my config files. It
doesn't exist!?!. I have a couple books for examples, Enterprise and Dev
versions running here onsite. I cannot find this element in the 2 defined
configs that are supposed to have this element. Since they don't seem to
exist, am I supposed to add it? and Where in the config files?. Any ideas
or a point in the right direction. Even the help files say the config files
are supposed to have this element, and to remove the comment. but it doesn't
seem to exist. Help:)
Frustrated Reporter:)Hi Clint,
I've been through rather step learning curve with Custom Assemblies over the
last week and although I'm definately not a guru, I hope to be able to
return some advice in this area - I hope !
OK, I expect the 2 config files are the Report Designer and the RS config
files yes ?
In order to make custom assemblies work, it depends on what they do - this
governs what code security policy directives you need to implment into youe
RS policy config file.
RS will "trust" your custom assemblies to a point (simply static expressions
require no special privelidges) . . . . if however you try and access
protected resources outside your custom assemblies (eg. call a web Service,
get environment vars, read files etc) you'll need to add specific details
and evidence info. into the RS Policy Server PemissionSet and Code group
sections
I can give specific help on these issues if you need more direction.
If you have corrupted (or badly formatted XML in your config files, you may
need to recover from backup (of in worse case just re-install RS)
regards,
- peteZ
"Clint Jennings" <cjennings@.fusionAlliance.com> wrote in message
news:O5hmffGkEHA.2664@.TK2MSFTNGP11.phx.gbl...
> Having problems with the <CustomAssemblies> attribute in my config files.
> It
> doesn't exist!?!. I have a couple books for examples, Enterprise and Dev
> versions running here onsite. I cannot find this element in the 2 defined
> configs that are supposed to have this element. Since they don't seem to
> exist, am I supposed to add it? and Where in the config files?. Any ideas
> or a point in the right direction. Even the help files say the config
> files
> are supposed to have this element, and to remove the comment. but it
> doesn't
> seem to exist. Help:)
> Frustrated Reporter:)
>|||It took a few tries but success. Thanx PeteZ.
"PeteZ" wrote:
> Hi Clint,
> I've been through rather step learning curve with Custom Assemblies over the
> last week and although I'm definately not a guru, I hope to be able to
> return some advice in this area - I hope !
> OK, I expect the 2 config files are the Report Designer and the RS config
> files yes ?
> In order to make custom assemblies work, it depends on what they do - this
> governs what code security policy directives you need to implment into youe
> RS policy config file.
> RS will "trust" your custom assemblies to a point (simply static expressions
> require no special privelidges) . . . . if however you try and access
> protected resources outside your custom assemblies (eg. call a web Service,
> get environment vars, read files etc) you'll need to add specific details
> and evidence info. into the RS Policy Server PemissionSet and Code group
> sections
> I can give specific help on these issues if you need more direction.
> If you have corrupted (or badly formatted XML in your config files, you may
> need to recover from backup (of in worse case just re-install RS)
> regards,
> - peteZ
>
> "Clint Jennings" <cjennings@.fusionAlliance.com> wrote in message
> news:O5hmffGkEHA.2664@.TK2MSFTNGP11.phx.gbl...
> > Having problems with the <CustomAssemblies> attribute in my config files.
> > It
> > doesn't exist!?!. I have a couple books for examples, Enterprise and Dev
> > versions running here onsite. I cannot find this element in the 2 defined
> > configs that are supposed to have this element. Since they don't seem to
> > exist, am I supposed to add it? and Where in the config files?. Any ideas
> > or a point in the right direction. Even the help files say the config
> > files
> > are supposed to have this element, and to remove the comment. but it
> > doesn't
> > seem to exist. Help:)
> >
> > Frustrated Reporter:)
> >
> >
>
>|||peteZ, I an having this same problem. What config file and where should the
<CustomAssemblies> attribute be added?
Thanks
"PeteZ" wrote:
> Hi Clint,
> I've been through rather step learning curve with Custom Assemblies over the
> last week and although I'm definately not a guru, I hope to be able to
> return some advice in this area - I hope !
> OK, I expect the 2 config files are the Report Designer and the RS config
> files yes ?
> In order to make custom assemblies work, it depends on what they do - this
> governs what code security policy directives you need to implment into youe
> RS policy config file.
> RS will "trust" your custom assemblies to a point (simply static expressions
> require no special privelidges) . . . . if however you try and access
> protected resources outside your custom assemblies (eg. call a web Service,
> get environment vars, read files etc) you'll need to add specific details
> and evidence info. into the RS Policy Server PemissionSet and Code group
> sections
> I can give specific help on these issues if you need more direction.
> If you have corrupted (or badly formatted XML in your config files, you may
> need to recover from backup (of in worse case just re-install RS)
> regards,
> - peteZ
>
> "Clint Jennings" <cjennings@.fusionAlliance.com> wrote in message
> news:O5hmffGkEHA.2664@.TK2MSFTNGP11.phx.gbl...
> > Having problems with the <CustomAssemblies> attribute in my config files.
> > It
> > doesn't exist!?!. I have a couple books for examples, Enterprise and Dev
> > versions running here onsite. I cannot find this element in the 2 defined
> > configs that are supposed to have this element. Since they don't seem to
> > exist, am I supposed to add it? and Where in the config files?. Any ideas
> > or a point in the right direction. Even the help files say the config
> > files
> > are supposed to have this element, and to remove the comment. but it
> > doesn't
> > seem to exist. Help:)
> >
> > Frustrated Reporter:)
> >
> >
>
>