Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLStringConnect
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00781825
Message ID:
00781837
Views:
14
>I have a VFP-application working in my company using VFP as the client interface and data stored on a SQL-server. For every new project we have I create a new database on the server instance that store all the projects with tables and table structures identical for every project (we have other SQL server instances for other purposes as well). For all personnel working with the system I create a user DSN by using the Data source administrator and give the user data source name the project name. This is done on each client PC for every new project. Now the number of persons and the number of projects are increasing and I find it inconvenient to administrate this work. Therefore I have been looking for a possibility to connect the client application to new databases in an automatic way without creating a user DSN on each PC. Following is what I have tried:
>
>lcConnectionString="DRIVER = SQL Server;" ;
> + "SERVER=mySQLServername\projectServerInstance;" ;
> + "UID=myUserID;";
> + "PWD=myPassword;"
> + "DATABASE=myProjectName"

You might try including the 'Data Source' identifier in your string, ex:
Data Source=Northwind
>gnConProject=SQLSTRINGCONNECT(lcConnectionString)
>
>When I execute the code above a window pops up named Select Data Source and this is not what I want. Can someone help me out?
>
>Today I use following code line for the connection:
>STORE SQLCONNECT('myProjectName',’myUserID’,'myPassword') TO gnConProject
>and it works OK, but mentioned above, only if the user DNS is created on each client PC.
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform