Showing posts with label library. Show all posts
Showing posts with label library. Show all posts

Sunday, March 25, 2012

architecture question: not representing inheritance in the data mo

Hi
You may want to read the patterns and practices recommendations at
http://msdn.microsoft.com/library/d...
Spatterns.asp
such as
http://msdn.microsoft.com/library/d...Gag
.asp
If you are using user input to generate you SQL make sure you code against
SQL injection techniques. Also look at using sp_executesql to run the code
you generate.
John
"PJ6" wrote:

> First up, I know I'll get some good answers here, but in general, are ther
e
> any newsgroups devoted to overall application architecture?
> Second, sorry for cross-posting but in this case I think it's appropriate,
I
> want to hear answers from both sides.
> Instead of representing inheritance in the data model, in the particular
> project I'm working on now I've decided to do it in OO to keep it looser;
> each class gets its own table, because the details vary, but implements an
> interface. Each class serves a static collection of itself which it loads
> from the database. I get a master list of these items by putting all the
> collections together into one of the common interface type.
> Obtaining a master list in this way is a great simplification over the rou
te
> I would have normally chosen - I otherwise would have had a "base" table
> containing the properties of the common interface, and requiring that all
> "inheritor" tables have a foreign key to it. I already know that this is a
> little iffy since 1 to 1 relationships aren't exactly a good thing. Of
> course, I could have thrown everything into one table containing all the
> fields in every class, which poses its own problems and ugliness. Not liki
ng
> either of these options, I decided to dump representing inheritance at all
> in the database. And this led me in a new direction...
> Partially through the convenience of generics, I've noticed that since I'm
> caching everything locally already, it's easy to just do dictionary lookup
s
> through all this data to find subsets. I'm in effect sidestepping the norm
al
> chore of setting up stored procedures. Actually, I use attributes to speci
fy
> table names and fields to populate in each class, so I have no pre-written
> SQL at all in the entire application. I sort of like it, but this is
> something new for me - I normally push a lot of stuff as far as I can down
> into the data model; now I'm just using the database as a "dumb" container
.
> So to those other architects out there, what is your take on this approach
?
> Thanks,
> Paul
> P.S. - some additional information
> 1. yes, in this case, the user will often need access to all the data at
> once since there will be several different global analysis views
> 2. the data will change only wly through an automated process
>
>I've disagreed pretty sharply with MS on the subject of data access... but I
guess that's mostly just because of their examples of implementation. The
second article is interesting; thanks for making me take a another look.
Paul
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B6CD35F3-6D60-453D-802F-906DD9F7CCE7@.microsoft.com...
> Hi
> You may want to read the patterns and practices recommendations at
> http://msdn.microsoft.com/library/d.../MSpatterns.asp
> such as
> http://msdn.microsoft.com/library/d...G
ag.asp
> If you are using user input to generate you SQL make sure you code against
> SQL injection techniques. Also look at using sp_executesql to run the code
> you generate.
> John
> "PJ6" wrote:
>

Monday, February 13, 2012

App.config?

Hello All,

I am trying to use a custom C# dll from within a script task. The C# dll relies on the Enterprise Library 2.0. Where do I put the enterprise library configuration when I am debugging a package and then when I have the package in production. I cannot find any documentation anywhere on this.

Thanks for any help,

Justin

You need to edit:

DTExec.exe.config|||

Hi Jamie,

Thanks for the quick reply. Will that apply the config to all packages? If so, is there a way to supply a config file for a specific custom dll?

Also, do I need to put the same config in all 3 of those files?

Thanks,

Justin

|||

jechternach wrote:

Hi Jamie,

Thanks for the quick reply. Will that apply the config to all packages?

Depends how you execute it. DtsDebugHost.exe is what runs the packages in BIDS. dtshost.exe is what runs packages executed out-of-process from the Execute Package Task. Dtexec.exe is what is used at all other times.

jechternach wrote:

If so, is there a way to supply a config file for a specific custom dll?

Dunno. I don't fully understand this stuff in all honesty. Hoepfulyl someone else will.

jechternach wrote:

Also, do I need to put the same config in all 3 of those files?

Thats what we did on my last project and it worked well!!

-Jamie

|||

Jamie,

Thanks again. You have helped immensely.

I found this blog article about configuring biz talk with config files per custom dll, maybe SSIS was implemented the same way.

http://blog.magenic.com/andym/archive/2005/05/02/732.aspx

Thanks again,

Justin

App.Config files in a Custom Database Extension Class Library

Good Morning..

We're having a heck of a good time trying to implement our first CDE project in SSRS 2005.

In our SDE class library we have included an App.Config file where we want to store configuration settings..

Trouble is that when we view the configuration settings or connection string settings in debug mode, they're not being read for some reason..

Here's our app.config file:

-

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<configSections>

</configSections>

<appSettings>

<add key="eventLogName" value="FocusDPEEventLog" />

</appSettings>

<connectionStrings>

<add name="PassConnString" connectionString="Data Source=SOMEDATASOURSE;Persist Security Info=True;User ID=SOMEUSERNAME;Password=SOMEPASSWORD;Unicode=True"

providerName="System.Data.OracleClient" />

</connectionStrings>

</configuration>

-

Here's what our Immediate window Debugger is tellin' us about our configuration settings:

-

ConfigurationManager.AppSettings

{System.Configuration.KeyValueInternalCollection}

[System.Configuration.KeyValueInternalCollection]: {System.Configuration.KeyValueInternalCollection}

base {System.Collections.Specialized.NameObjectCollectionBase}: {System.Configuration.KeyValueInternalCollection}

AllKeys: {Dimensions:[0]}<-incorrect should be 1

ConfigurationManager.ConnectionStrings

Count = 1 <-ok, is one, but the wrong 1, see 3 lines down...

base {System.Configuration.ConfigurationElementCollection}: Count = 1

ConfigurationManager.ConnectionStrings[0]

{data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}<--Should be PassConnString

base {System.Configuration.ConfigurationElement}: {data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}

ConnectionString: "data source=.\\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"

Name: "LocalSqlServer"

ProviderName: "System.Data.SqlClient"

Now notice the stuff in bold...I have NO IDEA where this gosh-danged thing is reading, but it doesn't seem like it's the app.config file in our class library...

thanks..

Doug

Hi

I am facing the same problem. I dont know where to set the custom configuration settings. I am pretty sure it will have to be somewhere in Report Server Config files, but where?

Regarding the stuff in bold you are seeing is coming from the base asp.net machine settings.

App.Config files in a Custom Database Extension Class Library

Good Morning..

We're having a heck of a good time trying to implement our first CDE project in SSRS 2005.

In our SDE class library we have included an App.Config file where we want to store configuration settings..

Trouble is that when we view the configuration settings or connection string settings in debug mode, they're not being read for some reason..

Here's our app.config file:

-

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<configSections>

</configSections>

<appSettings>

<add key="eventLogName" value="FocusDPEEventLog" />

</appSettings>

<connectionStrings>

<add name="PassConnString" connectionString="Data Source=SOMEDATASOURSE;Persist Security Info=True;User ID=SOMEUSERNAME;Password=SOMEPASSWORD;Unicode=True"

providerName="System.Data.OracleClient" />

</connectionStrings>

</configuration>

-

Here's what our Immediate window Debugger is tellin' us about our configuration settings:

-

ConfigurationManager.AppSettings

{System.Configuration.KeyValueInternalCollection}

[System.Configuration.KeyValueInternalCollection]: {System.Configuration.KeyValueInternalCollection}

base {System.Collections.Specialized.NameObjectCollectionBase}: {System.Configuration.KeyValueInternalCollection}

AllKeys: {Dimensions:[0]}<-incorrect should be 1

ConfigurationManager.ConnectionStrings

Count = 1 <-ok, is one, but the wrong 1, see 3 lines down...

base {System.Configuration.ConfigurationElementCollection}: Count = 1

ConfigurationManager.ConnectionStrings[0]

{data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}<--Should be PassConnString

base {System.Configuration.ConfigurationElement}: {data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}

ConnectionString: "data source=.\\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"

Name: "LocalSqlServer"

ProviderName: "System.Data.SqlClient"

Now notice the stuff in bold...I have NO IDEA where this gosh-danged thing is reading, but it doesn't seem like it's the app.config file in our class library...

thanks..

Doug

Hi

I am facing the same problem. I dont know where to set the custom configuration settings. I am pretty sure it will have to be somewhere in Report Server Config files, but where?

Regarding the stuff in bold you are seeing is coming from the base asp.net machine settings.