ifx_getcur_conn_name()
Returns the name of the current connection.
sqgetdbs()
Returns the names of databases that a database server can access.
sqlbreak()
Sends the database server a request to stop processing.
sqlbreakcallback()
Establishes a time-out interval and a callback function for interrupting an SQL request.
sqldetach()
Detaches a child process from a database server connection.
sqldone()
Determines whether the database server is currently processing an SQL request.
sqlexit()
Terminates a database server connection.
sqlsignal()
Performs signal handling and cleanup of child processes.
sqlstart()
Starts a database server connection.
ifx_getcur_conn_name() The ifx_getcur_conn_name() function returns the name of the current connection. Syntax
ret_fcnt
is a pointer to the number of database names that the function returns.
dbnarray
is a user-defined array of character pointers.
dbnsize
is the size of the dbnarray user-defined array.
dbnbuffer
is a pointer to a user-defined buffer that contains the names of the databases that the function returns.
dbnbufsz
is the size of the dbnbuffer user-defined buffer.
Example Output The output you see from the sqgetdbs sample program depends on how you set your INFORMIXSERVER and DBPATH environment variables. The following sample output assumes that the INFORMIXSERVER environment variable is set to mainserver and that this database server contains three databases that are called stores7, sysmaster, and tpc. This output also assumes that the DBPATH environment is not set.
SELECT
OPEN
ALTER INDEX
UPDATE
CREATE TABLE
EXECUTE PROCEDURE
DELETE
CREATE INDEX
INSERT
ALTER TABLE
2. Sets SQLCODE (sqlca.sqlcode) to a negative value (-213)
-213
3. Returns control to the application
0
The call to sqlbreak() was successful. The database server connection exists and either a request to interrupt was sent successfully or the database server was idle.
!=0
No database server is running (no database connection exists) when you called sqlbreak().
timeout
is the interval of time to wait for an SQL request to execute before the application process regains control.
This value can be as follows:
-1
clears the time-out value.
immediately calls the function that callbackfunc_ptr indicates.
>0
sets the time-out interval to the number of milliseconds to elapse before the application calls the function that callbackfunc_ptr indicates.
The timeout parameter is a 4-byte variable. This parameter is operating-system dependent: it could be a variable with an int, long, or short data type.
callbackfunc_ptr
is a pointer to the user-defined callback function.
When the database server begins processing an SQL request
status = 1
While the database server executes an SQL request, when the time-out interval has elapsed
status = 2
When the database server completes the processing of an SQL request
status = 0
When you call the callback function with a status value of 2, the callback function can determine whether the database server can continue processing with one of following actions:
2
If you call sqlbreakcallback() with a time-out value of zero (0), the callback function executes immediately. The callback function executes over and over again unless it contains a call to sqlbreakcallback() to redefine the callback function with one of the following actions:
You must establish a database server connection before you call the sqlbreakcallback() function. The callback function remains in effect for the duration of the connection or until the sqlbreakcallback() function redefines the callback function. Return Codes
The call to sqlbreakcallback() was successful.
<0
The call to sqlbreakcallback() was not successful.
2. Call sqldetach() from the child process to detach the child process from the database server. This call closes the connection in the child process.
The call to sqldetach() was successful.
The call to sqldetach() was not successful.
-439
The database server is not currently processing an SQL request: it is idle.
The database server is currently processing an SQL request.
The call to sqlexit() was successful.
The call to sqlexit() was not successful.
sigvalue
is the integer value of the particular signal that needs to be trapped (as signal.h) defines).
Currently, this parameter is a placeholder for future functionality. Initialize this argument to -1.
sigfunc_ptr
is a pointer to the user-defined function, which takes no arguments, to call as a signal handler for the sigvalue signal.
Currently, this parameter is a placeholder for future functionality. Initialize this argument to a null pointer to a function that receives no arguments.
mode
is one of three possible modes:
initializes signal handling.
1
disables signal handling.
re-enables signal handling.
Return Codes
The call to sqlstart() was successful.
The call to sqlstart() was not successful.