Re: Deployment + Vista
- From: "Earl" <brikshoe@xxxxxxxxxxxxxxxxx>
- Date: Sun, 11 Mar 2007 01:14:44 -0500
I know nothing about Vista, but you do not have to bind your connection
string to your strongly typed datasets.
In the display layer of the app, I keep the strongly-typed datasets empty,
then when I need data, I call .Merge() on the strongly typed datasets in
order to return datatables from the appropriate data layer classes. Within
those classes is where I open dynamically created connections.
I deploy a small .xml and .xsd file with the default server name and
database settings (into the app directory), then give the user an input
panel so that they can specify any changes. Separately, I create a class
with separate functions to save and retrieve the settings, and with a couple
of properties for the server and database name. Then I can call a
GetConnectionString() function that calls the retrieval function in order to
put together the connection string something like: m_strConnection = "data
source=" + m_strSQLServerName + ";initial catalog=" + m_strDatabaseName +
";integrated security=SSPI;"
As you can see, the only hard-coded aspect of the string is simply the
security. If necessary, you could even modify that, although if you are
deploying with SqlExpress, you already know what the security setting will
be.
"Steven Spencer (Spinalogic)" <Spence-Spinalogic@xxxxxxxxxxxxxxxx> wrote in
message news:eqTquLrYHHA.984@xxxxxxxxxxxxxxxxxxxxxxx
We use strongly typed datasets, and thus our connection string is bound to
an application setting.
Currently we can deploy and alter the app.exe.config file at installation
time to successfully install, and use some basic XML editing to allow the
target database to be changed.
Writing to the application directory in vista will throw compatibility
errors, and not persist the changes at all.
What do we do? Is there a better way of getting the connection string in
your application, or a way of telling the designer where to get your
connection setting from??
.
- Follow-Ups:
- Re: Deployment + Vista
- From: Steven Spencer \(Spinalogic\)
- Re: Deployment + Vista
- References:
- Deployment + Vista
- From: Steven Spencer \(Spinalogic\)
- Deployment + Vista
- Prev by Date: Re: import large text file
- Next by Date: Re: Writing xml file from dataset different than the original
- Previous by thread: Deployment + Vista
- Next by thread: Re: Deployment + Vista
- Index(es):
Relevant Pages
|