Thanks Walter.  I updated both the SPs with the ones you provided they 
commited well.

So I dropped the original CREAR_... SP and recopied your original with 
the extra IN AUTONOMOUS line added to it.  But maybe my version of 
FireBird is wrong I get an error for the IN line and AUTONOMOUS word is 
not highlighted in FlameRobin so it might be a new reserved word which 
my version does not have.  I am using FB 2.1.4.18393.  I have also 
create the MYTABLE and it's field CREATINGCODE of VARCHAR(2048)

I have also tried to remove the IN line and kept the INSERT line then 
nothing is stored in MYTABLE.  I have also tried to remove the 
AUTONOMOUS word but kept the IN and INSERT line then too no luck.

Please advise

Thanks and regards
Bhavbhuti

Starting transaction...
Preparing statement:

CREATE PROCEDURE CREAR_TABLA_PIVOT(
   TCNOMBRETABLA VARCHAR(28),
   TCVISTA VARCHAR(28),
....
...
    lcCreate = Left(lcCreate, Char_Length(lcCreate) - 2);

    lcCreate = lcCreate || ');';

IN AUTONOMOUS TRANSACTION DO
    INSERT INTO MYTABLE (CREATINGCODE) VALUES(:lcCreate);

    EXECUTE STATEMENT lcCreate;

    -- Segundo, le agregamos una Primary Key

    EXECUTE STATEMENT
       'ALTER TABLE ' || tcNombreTabla ||
       ' ADD CONSTRAINT PK_' || tcNombreTabla ||
       ' PRIMARY KEY (' || Left(:tcPrimeraColumnaCabecera, Position(' ', 
:tcPrimeraColumnaCabecera)) || ')';

END
Error: *** IBPP::SQLException ***
Context: Statement::Prepare(

CREATE PROCEDURE CREAR_TABLA_PIVOT(
   TCNOMBRETABLA VARCHAR(28),
   TCVISTA VARCHAR(28),
...
...
    lcCreate = lcCreate || ');';

IN AUTONOMOUS TRANSACTION DO
    INSERT INTO MYTABLE (CREATINGCODE) VALUES(:lcCreate);

    EXECUTE STATEMENT lcCreate;

    -- Segundo, le agregamos una Primary Key

    EXECUTE STATEMENT
       'ALTER TABLE ' || tcNombreTabla ||
       ' ADD CONSTRAINT PK_' || tcNombreTabla ||
       ' PRIMARY KEY (' || Left(:tcPrimeraColumnaCabecera, Position(' ', 
:tcPrimeraColumnaCabecera)) || ')';

END )
Message: isc_dsql_prepare failed

SQL Message : -104
Invalid token

Engine Code    : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Token unknown - line 46, column 1
IN


Total execution time: 0.016s



On 30-12-2013 07:06 pm, W O wrote:
> IN AUTONOMOUS TRANSACTION DO
>    INSERT INTO MyTable (MyColumn) VALUES(:lcCreate);

-- 


Thanking you.

Yours Faithfully,
For Venus Software Operations
----
Mr. Bhavbhuti Nathwani
___________________________________________
Softwares for Indian Businesses at: http://www.venussoftop.com

[email protected]
[email protected]
___________________________________________

Please note: We reserve complete rights for policy changes in the future and 
the same will be applicable immediately as and when made.  Attachments may get 
corrupted before reaching you, in such a situation please let us know and we 
will resend you the same at the earliest.  We do not take any responsibility 
for data loss of any type and kind.  Data safety remains the sole the 
responsibility of the users of our softwares.
___________________________________________

Internet email confidentiality:

This message may contain information that may be privileged or confidential.  
If you are not the addressee nor are you responsible for the delivery of the 
message to the addressee indicated in this email, then you may not copy or 
deliver this email to anyone and you should notify the sender by reply email 
and then destroy this message.

Please reply email immediately to this message with REMOVE in the subject, if 
you or your employer do not consent to email of this kind.

Opinions, conclusions and other information in this message that do not relate 
to the official business of my firm shall be understood as neither given nor 
endorsed by my company.



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    http://info.yahoo.com/legal/us/yahoo/utos/terms/

Reply via email to