Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » MobiLink - Client Administration » SQL Anywhere Clients for MobiLink » Dbmlsync API » Dbmlsync API for C++


GetErrorInfo method

Use this method to retrieve additional information about the failure immediately after another method in the interface fails.

const DBSC_ErrorInfo *GetErrorInfo(  )

Returns a pointer to a DBSC_ErrorInfo structure that contains information about the failure. The DBSC_ErrorInfo structure is defined as follows:

typedef struct {
    DBSC_ErrorType type;
    const char  *str1;
    const char  *str2;
    long int  val1;
    long int  val2;
    DBSC_SyncHdl hdl1;
} DBSC_ErrorInfo;

The contents of this structure may be overwritten the next time any class method is called.


The type field contains a value that indicates the reason for the failure. Currently, type may take the following values:

  • DBSC_ERR_OK   No error occurred.

  • DBSC_ERR_NOT_INITIALIZED   The class has not been initialized by calling the Init method.

  • DBSC_ERR_ALREADY_INITIALIZED   The Init method was called on a class that was already initialized.

  • DBSC_ERR_NOT_CONNECTED   No connection to a dbmlsync server is in place.

  • DBSC_ERR_CANT_RESOLVE_HOST   Cannot resolve host information.

  • DBSC_ERR_CONNECT_FAILED   Connection failed.

  • DBSC_ERR_INITIALIZING_TCP_LAYER   Error initializing TCP layer.

  • DBSC_ERR_ALREADY_CONNECTED   Connect method failed because a connection was already in place.

  • DBSC_ERR_PROTOCOL_ERROR   This is an internal error.

  • DBSC_ERR_CONNECTION_REJECTED   The connection was rejected by the dbmlsync server.

    str1 points to a string returned by the server which may provide more information about why the connection attempt was rejected.

  • DBSC_ERR_TIMED _OUT   The timeout expired while waiting for a response from the server.

  • DBSC_ERR_STILL_CONNECTED   Could not Fini the class because it is still connected to the server.

  • DBSC_ERR_SYNC_NOT_CANCELED   The server could not cancel the synchronization request, probably because the synchronization was already in progress.

  • DBSC_ERR_INVALID_VALUE   An invalid property value was passed to the SetProperty method.

  • DBSC_ERR_INVALID_PROP_NAME   The specified property name is not valid.

  • DBCS_ERR_VALUE_TOO_LONG   The property value is too long. Properties must be less than DBCS_MAX_PROPERTY_LEN bytes long.

  • DBSC_ERR_SERVER_SIDE_ERROR   There was an error on the server.

    str1 points to a string returned by the server which may provide more information about the error.

  • DBSC_ERR_CREATE_PROCESS_FAILED   Unable to start a new dbmlsync server.

  • DBSC_ERR_READ_FAILED   Error occurred while reading data from the dbmlsync server.

  • DBSC_ERR_WRITE_FAILED   Error occurred while sending data to the dbmlsync server.

  • DBSC_ERR_NO_SERVER_RESPONSE   Failed to receive a response from the server that is required to complete the requested action.

  • DBSC_ERR_UID_OR_PWD_TOO_LONG   The UID or PWD specified is too long.

  • DBSC_ERR_UID_OR_PWD_NOT_VALID   The UID or PWD specified is not valid.

  • DBSC_ERR_INVALID_PARAMETER   One of the parameters passed to the function was not valid.

  • DBSC_ERR_WAIT_FAILED   An error occurred while waiting for the server to shutdown.

  • DBSC_SHUTDOWN_NOT_CALLED   WaitForServerShutdown method was called without first calling the ShutdownServer method.

  • DBSC_ERR_NO_SYNC_ACK   A synchronization request was sent to the server but no acknowledgement was received. There is no way to tell if the server received the request.

    hdl1 is the handle for the sync request that was sent. If the server received the request, this handle can be used to identify events for the synchronization retrieved using the GetEvent method.

str1, str2, val1, val2 and hdl1 contain additional information about the failure, and their meaning depends on the type value. For most type values there is no useful information in any of these fields. The exceptions are noted in the above in the previous list.