Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using VFP Data
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
00940097
Message ID:
00940892
Vues:
14
The file is simply XML so I would install a preformatted version of this stuff and then modify it in a post-install Exe. It's just XML so read the file change the value (using XML or string parsing) and then write it back out.

Or you can use my configuration class from here:

http://www.west-wind.com/presentations/configurationclass/configurationclass.asp

which allows you to write to the config file if you create a custom object for your config settings (which IMHO is a much better way to manage config settings in the first place).

Regards,

+++ Rick ---


>>>I am trying to set the data of my new app to a sub folder of it's directory, say data\
>>
>>>When I try to refrence that "simple" location in app.config it barfs. If I set the full path it's ok.
>>
>>OleDb needs full paths in order to connect to the data so you're stuck with this behavior. No workarounds.
>>
>>What you can do is create a small utility you can have them run (from a shortcut possibly) and automatically set this up, or include it as part of the app's startup or first time configuration *before* you access data.
>>
>>I do this with just about all of my apps not for data paths, but for any of the first time installation defaults that are specific to the environemnt.
>>
>
>Thanks Rick, this is in the App.config file. So how do you reference this? Submit a new veewion of the file, or some sort of XML that is written when they install?
>
>This is what is in my app.config for databases add key:
>add key="Chelsea\Connection" value="Provider=VFPOLEDB.1;Data Source=C:\WIN_PROJECTS\INPHORM\DATA\CHELSEA.DBC;Mode=Share Deny None;Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE"
>
>I will need to strike the C:\WIN_PROJECTS\INPHORM\ and reference whereever they pathed the install to so it can find DATA\CHELSEA.DBC
>
>I tried the @ but that doesn't work here @DATA\CHELSEA.DBC
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform