Subject RE: [IBO] IB_Script Error in 4.8 build 4 and past version
Author Jason Wharton
Jack,

> I am using databases that are Dialect 1 and I will change to Dialect 3
> once my customers get into their off season in December and January.
> I can run a command file using isql and not get any errors, but I
> cannot use ib_script to execute the file because I get the below error
> on all stored procedures that passes a numeric parameter as below.
> I have a set SQL dialect 1 command in the front of all command files.
> All other stored procedures without Numeric parameters are compiled
> correctly in IB_Script.
>
> ALTER PROCEDURE UPBTURN (B VARCHAR(10), P NUMERIC(15, 2))
> AS
> BEGIN
> UPDATE BARCODES
> SET OUT = OUT + 1, EARNED = EARNED + :P
> WHERE BARCODE = :B;
> END
> ISC ERROR CODE:335544569
>
> ISC ERROR MESSAGE:
> Dynamic SQL Error
> SQL error code = -817
> Metadata update statement is not allowed by the current database SQL
> dialect 1
>
> I believe that maybe the Numeric parameter is being passed as a
> dialect 3 value, since the same stored procedures are handled
> correctly by isql.
>
> If you need a sample program and database, I can send you one.

A sample would be great. First, would you please flesh in the details a
little more.

Are you saying that even though the SQLDialect of the database is set to 1
that when running the script it is insisting on treating the information as
if it were SQLDialect 3? I don't know how or why it would do that.

Perhaps you could show me what happens in the SQL trace monitor?

Thanks,
Jason