SQLDBC::Connection::connect

Prototypes

SQLDBC_Retcode SQLDBC::Connection::connect(const char *servernode, const char *serverdb, const char *username, const char *password, const SQLDBC_StringEncoding userpwdEncoding);

Description

Etablit la connexion avec l'utilisateur username de mot de passe password sur le serveur servernode pour la base de données serverdb.

Le résultat est SQLDBC_OK en cas de succès.

Exemple

#include <SQLDBC.h>

static SQLDBC_Environment *hEnvironnement;
static SQLDBC_Connection *hConnexion;

...
if (hConnexion->connect("aix", "maxdb_aix", "scott", "tiger")!=SQLDBC) ...
if (hEnvironnement->releaseConnection(hConnexion)!=SQLDBC) ...

Voir aussi

SQLDBC::Environment::releaseConnection pour se déconnecter.