Icon View Incident Report

Serious Serious
Reported By: Tiago Ameller
Reported On: 12/15/2003
For: Version 4.00 Build 1
# 1518 The OnQueryError Event is Trapping SQL Errors Incorrectly

1.Execute a couple of query scripts with TDBISAMQuery.ExecSQL.
2.Make one of them have a syntax error related to quotes (see above)
3.Don't write any TDBISAMQuery.OnQueryError event

Your app misses out. (I think due an stack overflow).

In DBSYS, you get into an infinte loop asking for abort or continue. If you say "continue with next script", DBSYS stays in the same
incorrect script without advancing.

My workaround was to write an TDBISAMQuery.OnQueryError event with this single line

raise Exception.Create(E.Message);

in order to reproduce 3.x behaviour.

/********* sample incorrect script **************/

DROP TABLE IF EXISTS "SCUSER.DAT";
CREATE TABLE IF NOT EXISTS "SCUSER.DAT"
(
"Codigo" SMALLINT DESCRIPTION 'Código' NOT NULL DEFAULT '1' MIN
'1' MAX '99',
"Nombre" CHARACTER(20) NOT NULL,
"Password" CHARACTER(8) DESCRIPTION 'Contraseña',
"RepitaPassword" CHARACTER(8) DESCRIPTION 'Repita Contraseña',
"F000" INTEGER NOT NULL DEFAULT 2147483647,
"F001" INTEGER NOT NULL DEFAULT 2147483647,
"F002" INTEGER NOT NULL DEFAULT 2147483647,
"F003" INTEGER NOT NULL DEFAULT 2147483647,
"F004" INTEGER NOT NULL DEFAULT 2147483647,
"F005" INTEGER NOT NULL DEFAULT 2147483647,

PRIMARY KEY ("Codigo") COMPRESS FULL
DESCRIPTION 'Fichero Usuarios'
);

CREATE NOCASE INDEX IF NOT EXISTS ixNombre ON 'SCUSER' /* must be
double, not single quotes */
("Nombre") COMPRESS FULL;

INSERT INTO SCUSER (Codigo, Nombre)
VALUES (1, "Master"); /* must be single, not double quotes */



Comments Comments
Forgot to originally log this for 4.01.


Resolution Resolution
Fixed Problem on 12/15/2003 in version 4.01 build 1
Image