Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC cursoradapter
Message
 
 
À
05/11/2003 02:59:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00845913
Message ID:
00846416
Vues:
22
>But what about my method?
>May it cause problems(using the same user and pass for all CA and for all users)?

If you do not need to track what each user is doing, who updated the record, etc., there is no problem using the same user and password to create the connection. I have also had no problems using the same connection for each CA or remote view.

If you want to have each user login with their own ID and password, just present them with a form that prompts for their ID and password and use those values in SQLSTRINGCONNECT() to create the connection.

I am no SQL Server person, but a SQL Server connection looks something like:
goApp.nConnectionHandle = ;
     SQLSTRINGCONNECT([Driver=SQL Server;Database=Northwind;UID=] ;
   + alltrim(THISFORM.txtUserID.Value) + [;PWD=] ;
   + alltrim(THISFORM.txtPassword.Value + [;Server=server_name_here;]
If the parameters in that string are incorrect, VFP will prompt you with the SQL Server login form so you can make corrections. Once the connection is established, issue _ClipText = SQLGETPROP(goApp.nConnectionHandle, "ConnectString") from the Command Window to place a copy of the complete connection string into the clipboard. Then you can paste it anywhere you need it.

An Oracle connection looks like:
goApp.nConnectionHandle = ;
     SQLSTRINGCONNECT([Driver=Microsoft ODBC for Oracle;UID=] ;
   + alltrim(THISFORM.txtUserID.Value) + [;PWD=] ;
   + alltrim(THISFORM.txtPassword.Value + [;Server=server_name_here;]
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform