4D v16

ODBC_SQLConnect

Accueil

 
4D v16
ODBC_SQLConnect

ODBC_SQLConnect 


 

ODBC_SQLConnect ( connectionID ; serverName ; nomUtilisateur ; motDePasse ) -> Résultat 
Paramètre Type   Description
connectionID  Entier long in Connection ID
serverName  Chaîne in Data source name
nomUtilisateur  Chaîne in User identifier
motDePasse  Chaîne in User password
Résultat  Entier long in Returns the result of the MS ODBC API function SQLConnect

The ODBC_SQLConnect function establishes a connection to a specific driver by passing it the serverName, userName, and password. It internally uses the MS ODBC API function SQLConnect.

connectionID is a valid connection ID returned by ODBC_SQLAllocConnect.

serverName is the name of the data source name.

userName is the user name or login name defined when setting up ODBC authorization.

password is the user password.

For more information, please see the SQLConnect function in the MS ODBC API Reference at http://msdn.microsoft.com/en-us/library/ms711810(VS.85).aspx.

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Exemple  

The following method connects you to a data source whose name, username, and password are passed to the ODBC_SQLConnect command:

 $result:=ODBC_SQLAllocConnect($connectionID)
 $result:=ODBC_SQLConnect($connectionID;"access";"Administrator";"admin1")
 If($result=SQL_SUCCESS) `Connection was successful
  `... continue by calling other commands that require a valid $connectionID
 End if



Voir aussi  

ODBC_SQLDisconnect

 
PROPRIÉTÉS 

Produit : 4D
Thème : ODBC_Connection
Numéro : 16993
Nom intl. : ODBC_SQLConnect

 
HISTORIQUE 

Créé : 4D ODBC Pro 2004

 
UTILISATION DE L'ARTICLE

4D ODBC Pro ( 4D v16)