From: Marcin K. <mk...@pi...> - 2006-05-29 06:36:08
|
Hi again I still have the same problem, even if I change stored procedure call to: {? = typetable_pk_gen} ^------ And my ODBC log: [ODBC][15834][SQLPrepare.c][173] Entry: Statement = 0x80b06d8 SQL = [{? = call typetable_pk_gen}][length = 38 (SQL_NTS)] [ODBC][15834][SQLPrepare.c][374] Exit:[SQL_ERROR] DIAG [HY000] [unixODBC][ODBC Firebird Driver][Firebird]Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 1 { In first mail I wrote, that ODBC driver didn't recognize first "{" character, and probably didn't parse rest of expression. I call this procedure from OTL (Oracle Template Library) but I think that problem is inside ODBC layer not OTL. I remind that EasySoft driver works fine in both types of stored procedure call. Vladimir, do you have any idea? Best regards, Marcin Kuthan > Hi > > I have a SQL error when I tried to call stored procedure. The stored > procedure generate value for PK, and have one out parameter: > > CREATE PROCEDURE typetable_pk_gen RETURNS (pk INTEGER) > AS > BEGIN > pk = gen_id(typetable_gen, 1); > END > > In my code I call procedure in the following way: > > {? call typetable_pk_gen} > > and get following ODBC log: > > [ODBC][21483][SQLPrepare.c][173] > Entry: > Statement = 0x80af170 > SQL = [{? call > typetable_pk_gen}][length = 36 (SQL_NTS)] > [ODBC][21483][SQLPrepare.c][374] > Exit:[SQL_ERROR] > DIAG [HY000] [unixODBC][ODBC Firebird > Driver][Firebird]Dynamic SQL Error > SQL error code = -104 > Token unknown - line 1, char 1 > { > [ODBC][21483][SQLGetDiagRec.c][681] > Entry: > Statement = 0x80af170 > Rec Number = 1 > SQLState = 0x80c4674 > Native = 0x80c4a5c > Message Text = 0x80c428c > Buffer Length = 511 > Text Len Ptr = 0xffffc070 > [ODBC][21483][SQLGetDiagRec.c][718] > Exit:[SQL_SUCCESS] > SQLState = HY000 > Native = 0x80c4a5c -> -104 > Message Text = [[ODBC Firebird > Driver][Firebird]Dynamic SQL Error > SQL error code = -104 > Token unknown - line 1, char 1 > {] > > I also tried EasySoft ODBC driver. This driver works correctly, I get > following ODBC log: > > [ODBC][21152][SQLPrepare.c][173] > Entry: > Statement = 0x80d2388 > SQL = [{? call > typetable_pk_gen}][length = 36 (SQL_NTS)] > [ODBC][21152][SQLPrepare.c][374] > Exit:[SQL_SUCCESS] > [ODBC][21152][SQLBindParameter.c][186] > Entry: > Statement = 0x80d2388 > Param Number = 1 > Param Type = 4 > C Type = -16 SQL_C_SLONG > SQL Type = 4 SQL_INTEGER > Col Def = 4 > Scale = 0 > Rgb Value = 0x80b9608 > Value Max = 4 > StrLen Or Ind = 0x80bf498 > [ODBC][21152][SQLBindParameter.c][342] > Exit:[SQL_SUCCESS] > [ODBC][21152][SQLExecute.c][186] > Entry: > Statement = 0x80d2388 > [ODBC][21152][SQLExecute.c][341] > Exit:[SQL_SUCCESS] > [ODBC][21152][SQLRowCount.c][159] > Entry: > Statement = 0x80d2388 > Row Count = 0xffffc60c > [ODBC][21152][SQLRowCount.c][234] > Exit:[SQL_SUCCESS] > Row Count = 0xffffc60c -> -1 > [ODBC][21152][SQLExecute.c][186] > Entry: > Statement = 0x80b7978 > [ODBC][21152][SQLExecute.c][341] > Exit:[SQL_SUCCESS] > > > Why opensource driver can not recognize "{" character as stored > procedure call? How can I execute stored procedure (maybe {? call > procedure_name} expression is wrong)? > > My environment: > > Firebird Super Server: 1.5.1 (from Debian package) > ODBC Driver: beta 2004-04-24 (from source) > GCC: 3.3.5 > Libc: 2.3.2 > > Any help will be appreciated. > |