Perl Error Messages

The Perl Driver generates error messages if internal driver APIs or CT-Lib's APIs fail. For example:

Example 1, message id 3

 OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (3)
 Message String: s_command_alloc() : SybaseASE : Internal error:        
        The ct_cmd_alloc() api failed.

Example 2, message id 14

 OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (14)
 Message String: s_db_connect() : SybaseASE : Internal error:        
        cannot change to database tempdb. 
The following table contains four fields:
  • The message ID, which is printed in the NUMBER = (<num>) field
  • The message text with parameters substituted at the specific code location in the driver
  • The severity, which are either warning or fatal
  • A possible fix or explanation
Message ID Message Text Severity Fix/Explanation

1

%1! unable to allocate memory.

Fatal

Check system and memory resources.

%1 can contain function names such as cs_con_alloc(), ct_conn_alloc(), and malloc().

2

%1! handle is null.

Fatal

Internal Driver error. The connection or cmd handle is NULL

3

The %1! api failed. Fatal Internal Driver error. Can be caused by an invalid DSN connection string or internal CT-Lib. The error string contains the function name of the failing API.
4 handle is null for statement id %1!. Reserved Reserved
5

failure for statement id %1!.

Fatal Internal Error. ct_dynamic() API trying to de-allocate a statement id that is failed.
6 send failure for statement id %1!. Reserved Reserved
7 %1! must be > 0. Fatal DSN string validation failed. Check DSN string for illegal characters.
8 %1! must be <= %2!, setting to maximum allowed value. Warning An attempt was made to configure more connections than currently allowed (128).
9

ct_config(CS_SET, %1!) failed. The supplied option %2! is illegal or missing.

Fatal ct_config() API failed because an invalid option was given. Check the DSN string and the string in the second parameter.
10 cs_locale(CS_SET, %1! %2!) failed. Fatal cs_locale() API failed. The error string indicates where the failure happened.
11 cs_dt_info(CS_SET, CS_DT_CONVFMT) failed. Fatal Error string will indicate where error occurred.
12 ct_debug(CS_SET CS_DBG_PROTOCOL) failed. Reserved Reserved
13 ct_con_props(CS_SET, %1!) failed. The supplied option %2! is illegal or missing. Fatal ct_con_props() API failed. The error string indicates where the failure happened.
14 cannot change to database %1!. Fatal Driver fails. Check DSN if the given database name exists.
15 ct_command() failed for %1!. Fatal ct_command() API failed. The error string indicates what type of CMD failed.
16 ct_send() failed for %1!. Fatal The ct_send() API failed. The error string contained in %1 will give details.
17 ct_describe() failed for column %1!. Fatal ct_describe() API failed. Error string indicates where error occurred.
18 ct_compute_info() failed on column %1! when describing column %2!. Fatal ct_compute_info() API failed. Error string indicates column number and operation type involved.
19 conversion failed %1!. Warning cs_convert() had failures. The error string indicates where error occurred.
20 ct_param() failed. Fatal ct_param() API failed. Error string indicates failure location.
21 ct_command() %1! failed for statement %2!. Fatal ct_command() API failed. The error string indicates what type of CMD failed including the statement.
22 ct_results() failed for %1!. Fatal ct_results() API failed. The error string indicates the driver facility and failed statement.
23 %1! command is ineffective with autocommit enabled. Warning Error string indicates attempted commit or rollback that is invalid.
24 ct_dynamic(CS_PREPARE) failed on statement %1!. Fatal Dynamic Prepare failed. Statement name is supplied in the error string.
25 ct_dynamic(CS_DESCRIBE INPUT) failed on statement %1!. Fatal Dynamic Describe failed. Statement name is supplied in the error string.
26 ct_dynamic(CS_EXECUTE) failed on statement %1!. Fatal Dynamic Execute failed. Statement name is supplied in the error string.
27 %1! database handle is inactive, not connected to server. Fatal An attempt was made to connect to a server with invalid database handle or inactive connection.
28 sub connections are not allowed. Fatal Sub connections not allowed if database handle active and in use
29 cannot bind placeholder %1!. Fatal Error attempting to bind placeholders. Error string indicates statement.
30 unexpected cancel. Fatal An unexpected cancel type was encountered while processing rows.
31 unexpected return code from %1!. Fatal An unexpected return code was encountered while processing rows.
32 invalid format %1! provided to syb_date_fmt. Fatal Invalid date format was given prior to date or time conversion.
33 Fatal: multiple active statement handles on database handle without autocommit enabled. Fatal User error where in the user Perl script more than one active handle is used without autocommit enabled.
34 Fatal: invalid or unsupported DSN option provided. Fatal If the Perl script has unsupported or obsolete options, DSN parsing fatally fails.