Connect method

Opens a connection with a dbmlsync server that is already running on this machine.

Syntax
bool Connect( const char *host, unsigned port, const char *uid, const char *pwd );
Remarks

The database user id and password passed in are used to validate whether or not this client has sufficient permissions to synchronize the database. When synchronizations are performed, the user id that was specified with the -c option when the dbmlsync server started is used.

Parameters
  • host    Reserved. Use null.

  • port    The TCP port on which the server is listening. Use the same port value that you specified when the server was started using the StartServer method.

  • uid   A valid database user id with DBA or REMOTE DBA authority on the remote database that is to be synchronized.

  • pwd   The database password for the user specified by uid.

Return value

Returns true if a connection to the server was established.

Returns false is a connection to the server could not be established. When false is returned, you can call the GetErrorInfo method to get more information about the failure. See GetErrorInfo method.