Consultor Eletrônico



Kbase P26330: SQL Explorer syntax error 7587 compiling SQL stored procedure in 9.1D
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

FACT(s) (Environment):

Progress 9.1D

SYMPTOM(s):

SQL Explorer syntax error 7587 compiling SQL stored procedure in 9.1D

SQL Explorer compiling stored procedure that contains slashes:

+ ".\""
+ sTblName.trim()
+ "\" TO " +

=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)

Sample code

CREATE PROCEDURE grantschema ( IN cPrivileges CHARACTER(60),
IN cSchemaName CHARACTER(15),
IN cUsers CHARACTER(60))
RESULT ( cSqlCmd CHARACTER(132) )
BEGIN
SQLCursor scTbl = new SQLCursor ("select tbl from "
+ "sysprogress.systables where owner = ? and "
+ "tbltype = 'T'");
scTbl.setParam (1, cSchemaName);
scTbl.open ();
scTbl.fetch ();
while (scTbl.found()) {
String sTblName = (String) scTbl.getValue(1, CHARACTER);
String sGrantCmd = new String( "GRANT " + cPrivileges.trim()
+ " ON " + cSchemaName.trim() + ".\""
+ sTblName.trim()
+ "\" TO " + cUsers.trim() + ";" );
SQLResultSet.set (1, sGrantCmd);
SQLResultSet.insert();
scTbl.fetch();
}
scTbl.close();
SQLResultSet.set (1, "COMMIT WORK;");
SQLResultSet.insert();
END;

CAUSE:

Bug 20030522-053

CAUSE:

This is a problem in the SQL-92 parser.

FIX:

Upgrade to Progress 9.1E or later.