Icon View Incident Report

Serious Serious
Reported By: Rolf Frei
Reported On: 12/15/2001
For: Version 3.03 Build 1
# 986 Using SQL CREATE TABLE Statement with Invalid PRIMARY KEY Fields Does Not Raise an Error

The following SQL has a problem with the incorrectly-typed field "Type" instead "Typ" in the primary key definition. Why does this not raise an SQL-error? The table gets fine created without any error, but the primary key is then missing.


with TDBISAMQuery.Create(nil) do
try
SessionName := MySession.SessionName;
DatabaseName := MyDB.DatabaseName;
SQL.Text :=
'CREATE TABLE Marketing ' +
'( ' +
' "Typ" INTEGER NOT NULL, ' +
' "BeginDate" DATE NOT NULL DEFAULT "CURRENT_DATE", ' +
' "Title" CHARACTER(50), ' +
' "PartNo" CHARACTER(8), ' +
' "Text1" CHARACTER(100), ' +
' "Text2" CHARACTER(100), ' +
' "LongText1" BLOB(0,1), ' +
' "Image1Path" CHARACTER(250), ' +
' "Image1" BLOB(0,5), ' +
' "Image2Path" CHARACTER(250), ' +
' "Image2" BLOB(0,5), ' +
' "IsDefault" BOOLEAN NOT NULL DEFAULT "False", ' +
'PRIMARY KEY ("Type","BeginDate") COMPRESS DUPBYTE ' +
'LANGUAGE "' +
LanguagesList[GetIndexFromLanguageID(GetUserDefaultLangID)] + '"' +
'SORT "Default Order" ' +
'USER MAJOR VERSION 1 ' +
'USER MINOR VERSION 0' +
')';
ExecSQL;
finally
Free;
end;




Resolution Resolution
Fixed Problem on 12/16/2001 in version 3.04 build 1
Image