Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection String
Message
From
19/06/2006 15:00:41
 
 
To
19/06/2006 14:56:33
Randy Hooper
Ranco Business Software
Tampa, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01130047
Message ID:
01130053
Views:
18
>Can a connection string be change at run time? I have develop an application from my home office and in my connection string I have the IP address for the server I'm hitting. Now I'm going to move my app in side the office I need to change the IP address to the server I'm wanting to use.
>
>I think this is what's going on the app runs fine from my home office I have move it to the office I'm getting the connection failure error and when the dialog box comes up I can enter in the IP address and all works fine.
>
>Or any ideals on how to handle this.

What I do is to have something like this in a configuration file:
[System]
ConnectionString=1

[ConnectionString]
ConnectionString1=Provider=VFPOLEDB.1;Data Source="d:\iis\MyWebSite\App_Data";Password='';Collating Sequence=MACHINE
ConnectionString2=Data Source=MyPC;Initial Catalog=My Catalog;Integrated Security=True
ConnectionString3=Provider=VFPOLEDB.1;Data Source="d:\iis\MyWebSite2\App_Data";Password='';Collating Sequence=MACHINE
So, at run time, you can read the configuration file and know which connection string to use.
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
Reply
Map
View

Click here to load this message in the networking platform