setting CLIENT_MULTI_RESULTS

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
angerp67
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 15.12.2007, 16:26

setting CLIENT_MULTI_RESULTS

Post by angerp67 »

HI,
I created a stored procedure but when I execute query for run the program
mysql raise an error sql error p_program can't return a result set in the given context.

reading mysql documentation there is a connection parameter CLIENT_MULTI_STATEMENTS to set.

How can i set this parameter in the connection object??


best regards
Paolo Angeretti
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

From the documentation 'parameters' file :

3. MySQL Driver Parameters
==========================
3.1. Connection parameters
==========================
* compress=[yes,no] - Turn on/off compression protocol
* dbless=[yes,no] - Connect to the real database or not (dbless mode)
* useresult=[yes,no] - Fetching rows using UseResult instead
StoreResult.
* timeout=<seconds> - Connection timeout in seconds.
* codepage=<client codepage> - Sets a client codepage. It executes a
SET CHARACTER SET <client codepage> statement righ after connect. Refer
your MySQL server manual for details.
* all mysql_real_connect clientflags are now supported using the names
from the enum type below. (Eg. CLIENT_MULTI_STATEMENTS=TRUE) :
TMYSQL_CLIENT_OPTIONS =
( CLIENT_LONG_PASSWORD, { = 1; { new more secure passwords }
CLIENT_FOUND_ROWS , { = 2; { Found instead of affected rows }
CLIENT_LONG_FLAG , { = 4; { Get all column flags }
CLIENT_CONNECT_WITH_DB , { = 8; { One can specify db on connect }
CLIENT_NO_SCHEMA , { = 16; { Don't allow database.table.column }
CLIENT_COMPRESS , { = 32; { Can use compression protcol }
CLIENT_ODBC , { = 64; { Odbc client }
CLIENT_LOCAL_FILES , { = 128; { Can use LOAD DATA LOCAL }
CLIENT_IGNORE_SPACE , { = 256; { Ignore spaces before '(' }
CLIENT_CHANGE_USER , { = 512; { Support the mysql_change_user() }
CLIENT_INTERACTIVE , { = 1024; { This is an interactive client }
CLIENT_SSL , { = 2048; { Switch to SSL after handshake }
CLIENT_IGNORE_SIGPIPE , { = 4096; { IGNORE sigpipes }
CLIENT_TRANSACTIONS , { = 8196; { Client knows about transactions }
CLIENT_RESERVED , { = 16384; { Old flag for 4.1 protocol }
CLIENT_SECURE_CONNECTION , {= 32768; { New 4.1 authentication }
CLIENT_MULTI_STATEMENTS , {= 65536; { Enable/disable multi-stmt support }
CLIENT_MULTI_RESULTS , { = 131072; { Enable/disable multi-results }
CLIENT_OPT_18, {2^18 = 262144}
CLIENT_OPT_19,{2^19 = 524288}
CLIENT_OPT_20, {2^20 = 1048576}
CLIENT_OPT_21, {2^21 = 2097152 }
CLIENT_OPT_22, {2^22 = 4194304}
CLIENT_OPT_23, {2^23 = 8388608 }
CLIENT_OPT_24, {2^24 = 16777216 }
CLIENT_OPT_25, {2^25 = 33554432}
CLIENT_OPT_26, {2^26 = 67108864}
CLIENT_OPT_27, {2^27 = 134217728}
CLIENT_OPT_28, {2^28 = 268435456}
CLIENT_OPT_29, {2^29 = 536870912}
CLIENT_OPT_30, {2^30 = 1073741824}
CLIENT_REMEMBER_OPTIONS { = 2147483648; {Enable/disable multi-results });
* all mysql_options are now supported using the names from the enum
type below. (Eg. MYSQL_READ_DEFAULT_FILE=<filename>) :
TMySqlOption = (
MYSQL_OPT_CONNECT_TIMEOUT,
MYSQL_OPT_COMPRESS,
MYSQL_OPT_NAMED_PIPE,
MYSQL_INIT_COMMAND,
MYSQL_READ_DEFAULT_FILE,
MYSQL_READ_DEFAULT_GROUP,
MYSQL_SET_CHARSET_DIR,
MYSQL_SET_CHARSET_NAME,
MYSQL_OPT_LOCAL_INFILE,
MYSQL_OPT_PROTOCOL,
MYSQL_SHARED_MEMORY_BASE_NAME,
MYSQL_OPT_READ_TIMEOUT,
MYSQL_OPT_WRITE_TIMEOUT,
MYSQL_OPT_USE_RESULT,
MYSQL_OPT_USE_REMOTE_CONNECTION,
MYSQL_OPT_USE_EMBEDDED_CONNECTION,
MYSQL_OPT_GUESS_CONNECTION,
MYSQL_SET_CLIENT_IP,
MYSQL_SECURE_AUTH
);
* SSL connections are supported using this connection properties (using
mysql_sll_set library call) :
Properties.Strings = (
'MYSQL_SSL=TRUE'
'MYSQL_SSL_CA=D:/mysql/certs/ca-cert.pem'
'MYSQL_SSL_CERT=D:/mysql/certs/client-cert.pem'
'MYSQL_SSL_KEY=D:/mysql/certs/client-key.pem')

3.2. Statement parameters
=========================
* useresult=[yes,no] - Fetching rows using UseResult instead
StoreResult.
These parameters should be set in the 'Properties' TStrings Object properties of the TZConnection or TZQuery objects
Image
Post Reply