Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLStringConnect
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00781825
Message ID:
00781838
Vues:
14
Anders,

You've extra spaces around '=' in the 'DRIVER=' line which cause that dialog to popup. You can also add 'NETWORK=DBMSSOCN' option to the connection string so it'll use TCP/IP protocol regardless of the client configuration.
lcConnectionString="DRIVER=SQL Server;" ;
		+ "SERVER=mySQLServername\projectServerInstance;" ;
		+ "NETWORK=DBMSSOCN;" ;
		+ "UID=myUserID;" ;
		+ "PWD=myPassword;"
		+ "DATABASE=myProjectName"
>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"
>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.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform