dbGetError(3dba)


dbGetError -- return the current error status of a database connection

Synopsis

cc [flag ...] file ... -kthread -leels [library] ...
#include <eelsdba.h>

char * dbGetError( DBConn *conn, int *errorCode);

Description

Use this routine to retrieve the error message and code that was generated by a dbxxxxx routine on a database connection.

Arguments


conn
(Input) A database connection that was returned by a previous call to dbConnect(3dba).

errorCode
(Output) The actual numeric error code returned from the underlying database (if available).

Example

   str = dbGetError(conn, res, &err)
   printf("geterror returned %s\n", str);

Return values

If successful, dbGetError returns a string containing the error messages. Otherwise, it returns NULL.

References

dbConnect(3dba), Intro(3dba)


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004