Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to configure for SQLstringconnect on client machine
Message
De
21/02/2005 17:46:22
 
 
À
21/02/2005 16:11:41
Information générale
Forum:
ASP.NET
Catégorie:
Déploiements
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
00988971
Message ID:
00989051
Vues:
20
Thanks Bonnie,

I am just beginning to make the VFP to .NET mind bend, and have written a VERY small ASP.NET test app and had no idea how to install the new app on my production machine. Currently the connection string is "hard coded" in the SqlConnection component.

Please excuse me for asking stupid questions, but could you demonstrate how I can "soft code" my SqlConnection?

Thanks a million

Glenn

>Glenn,
>
>And how are you currently doing it?
>
>You can use a config file and put the connectionstring in there:
>
><?xml version="1.0" standalone="yes"?>
><configuration>
>  <appSettings>
>    <add key="ConnectionString" value="server=MyServer;database=MyDataBase;uid=UserName;pwd=MyPassword" />
>  </appSettings>
></configuration>
>
>Not real secure, as the password is in plain view, but I'll let you figure out how to deal with that. <g> If this is on the client machine, then the config file would be called MyApp.exe.config and would reside with the EXE. We connect to our database via Web Services, and so in that case the config file is on the Web Server and is called web.config.
>
>~~Bonnie
>
>
>
>>When deploying a .Net app which used a SQL backend, how do you program the connect string to be both compatible on your dev machine and on the user's machine? Can I use a configuratrion file (INI) or a Reg setting? If so are there any good examples?
>>
>>Thanks
>>
>>Glenn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform