SQL_SetVariable usage in a plugin.

masterziv

Member
Hi, I'm writing a plugin (or trying to do so) and I need to
execute a query with some parameters, I do like this:
SQL_SetVariable( "LANG", "ENGLISH" );
int res = SQL_Execute( "ALTER SESSION SET NLS_LANGUAGE = :LANG" );

and I've got res == 1036 (ORA-01036: illegal variable name/number)

Am I doing it correctly?
Can I have an example of usage of SQL_SetVariable ?
 
You can only use variables for PL/SQL Code and DML statements like select, insert, update and delete. For alter session statements you will have to build the complete statement without using variables:

Code:
int res = SQL_Execute( "ALTER SESSION SET NLS_LANGUAGE='ENGLISH'");
 
Back
Top