Starts a session with the database. (UTF-8 version.)
Parameters
const char *database,
const char *ident,
const char *password,
MimerSession *sessionhandle)
database |
in |
The name of the database to connect to. If this is null, a connection to the default database is created. |
ident |
in |
The ident associated with the session to create. This parameter may not be null. |
password |
in |
The password of the ident. A null value is identical to a zero length password. Database servers which do not enforce authentication control may ignore the password. |
sessionhandle |
out |
A session handle identifying the session when calling MimerEndSession, MimerBeginStatement, MimerBeginStatement8, MimerBeginStatementC, MimerBeginTransaction, MimerExecuteStatement, MimerExecuteStatement8, MimerExecuteStatementC and MimerEndTransaction. |
Returns
A negative value indicating an error, or zero if successful.
Return value |
Description |
---|---|
MIMER_SUCCESS |
Success. |
MIMER_OUTOFMEMORY |
Out of memory. |
MIMER_ILLEGAL_CHARACTER |
One of the string parameters database, ident or password contained an illegal character. |
< 0 |
Any of the server error codes listed in Return Codes. |
Notes
This routine interacts with the database server.
A session handle may or may not have been returned. MimerEndSession should therefore always be called to avoid handle leaks.
Micro API compatible.
UTF-8 version of the routine. See Character String Formats for more information about character formats and the different routine versions.