Re: How to do non dependence on database vendor?
- From: "Brett" <no@xxxxxxxx>
- Date: Tue, 17 May 2005 10:16:23 -0400
"Bjorn Abelli" <bjorn_abelli@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23MZC$YuWFHA.3584@xxxxxxxxxxxxxxxxxxxxxxx
>
> "Brett" wrote...
>> "Bjorn Abelli" wrote...
>
>>> My application will read from the configuration file (plain
>>> text, e.g. an ini-file), to get the information needed to do
>>> the reflection (loading the right assembly).
>>>
>>> That way, I will not need to create a new dll each time I
>>> want to configure for a new DB-connection. I just add some
>>> lines in the ini-file, e.g.:
>>
>> I see. What are the advantages/disadvantages of using the
>> DLL and INI file approaches?
>>
>> I do see the INI file will be much quicker to preare and modify.
>> Also, do you need to drag this INI file around with your EXE or
>> can you put it into a module assembly file with other metadata?
>> What about compiling it as a resource with your EXE?
>
> Sure you can, but then you would lose the "easy to prepare and
> modify"-approach, as you still would need to re-compile for each new
> DB-configuration.
>
> The thing with this approach is that you *don't* need to modify the exe-
> or dll-files, when you add new ADO.NET-providers to your configuration.
>
Ok. This would still require an application restart correct? The point is
that we are easily changing out a database. I don't imagine the application
to remain running and the user only pushes the "Release SQL Server" button
then the "Load Oracle" button. Or did you see it that way?
Of course we also need to have code that creates the proper DB tables and
schema right? The queries are hard coded in the lower DB layer. Where
would you put the initialization part for tables and schema, assuming they
do not exists? The tables and schema scripts would need to be generic
enough to work across multiple databases. Otherwise, you have a maintenance
issue. I'm not sure if something like ERwin will do this. However, you
would be married to such a tool everytime you require an update. Unless of
course you wanted to edit those scripts directly. I suppose those scripts
could also be placed into an INI or TXT file as the connection info is.
If tables and schema exits than the above part would be skipped, decreasing
load time.
> There are of course also other ways to achieve a similar result, such as
> making use of the Windows-registry, instead of a separate configuration
> file.
>
> // Bjorn A
>
>
>
.
- Follow-Ups:
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- References:
- How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- Re: How to do non dependence on database vendor?
- From: Brett
- Re: How to do non dependence on database vendor?
- From: Bjorn Abelli
- How to do non dependence on database vendor?
- Prev by Date: RegEx HELP!!!
- Next by Date: The problem of com event and its registe
- Previous by thread: Re: How to do non dependence on database vendor?
- Next by thread: Re: How to do non dependence on database vendor?
- Index(es):