Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scoping of class property
Message
From
21/12/2005 12:58:48
 
 
To
21/12/2005 09:56:34
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01079106
Message ID:
01079934
Views:
52
>I woke up in the middle of the night, had a hard time getting back to sleep, so my mind started wandering. It ended up on this topic for some strange reason ... I wondered why you are passing the connection string to your SQLExec method. Your Framework.Data class should simply get the connection string itself from your ConfigurationSettings.AppSettings["ConnectionString"]. It's really something that should be encapsulated within a DataAccess class, IMHO.

Well, now that I have this loDataAdapter approach, I could set it up at the property level instead of passing it as a parameter. But, it is still not what you are suggesting. For me, it is important to support that like that in order to be able to work with multiple connection strings from within one single application. I could have a need to query VFP table coming in from more than one directories, SQL Server tables, etc.

As for the setup of those connection strings, they are initialized from a Main.ini file that is read at the startup of the application, from my Framework.App() application class. They are then stored in an array named Framework.App.aConnection(). This is what I pass for all data queries.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform