dbfreelogin

DB Library for C

DB Library for C

dbfreelogin

Frees a login record.

Syntax

void dbfreelogin ( PLOGINREC login );

Arguments

login

Is the pointer to a LOGINREC structure returned from the dblogin function.

Remarks

This function frees the memory allocated by the dblogin function. It can be called immediately after a call to dbopen; however, you can use the same login record for multiple calls to dbopen. Call dbfreelogin when you are completely finished with the login record.

Examples

The following example shows how to use dbfreelogin:

DBPROCESS   *dbproc;
LOGINREC   *loginrec;

loginrec = dblogin();
DBSETLUSER(login, "user");
DBSETLPWD(loginrec, "my_password");
DBSETLAPP(loginrec, "my_program");
dbproc = dbopen(loginrec, "my_server");
dbfreelogin (loginrec);

See Also

dblogin

dbopen