Hello, How should I specify ‘paramters’ in a
Gda::Command ? I’ve got the following (in Ruby) @update_user = Gda::Command.new(
“UPDATE GARGOYLE.GRGL_USERS SET LOGIN=$1, NAME=$2, EMAIL=$3”
, Gda::Command::TYPE_SQL
, Gda::Command::OPTION_STOP_ON_ERRORS ) And then, later, I would like to write something like Dsn_connection.begin_transaction(
toto = Gda::Transaction.new( ‘toto’ ) ) Dsn_connection.execute_single_command(
@update_user,
Gda::ParameterList.new(
Gda::Parameter.new( ‘$1’ , <value to substitute $1 into
@update_user> ),
Gda::Parameter.new( ‘$2’ , <value to substitute $2 into
@update_user> ),
Gda::Parameter.new( ‘$3’ , <value to substitute $3 into
@update_user> ) ) ) Dsn_connection.commit_transaction(
toto ) Thanks Marzullo Laurent Atos Origin - Gestion de Configuration mail: laurent marzullo atosorigin com Tél: 01 44 (44 55 54) Marzullo Laurent Atos Origin - Gestion de Configuration mail: laurent marzullo atosorigin com Tél: 01 44 (44 55 54)
|