Question to Methods
Claudius Sailer
Claudius at sailer-online.de
Tue Feb 24 20:29:41 CST 2004
Am 24. Feb 2004 um 19:58 Uhr schrieb Ruslan Zasukhin:
> Aha, ys.
>
> V4RB 1.x do not have method in contractors.
> In V4RB 2.0 we have improve this.
Thats good.
But now it seems that I am too stupid. I took following Code from
ValentinaSQL
CREATE TABLE tbl1
(
fldBoolean boolean,
fldULong ulong NOT NULL UNIQUE,
fldString string(50,'English') NOT NULL,
fldText text(512, 'German') fldObjectPtr REFERENCES tbl1 ON DELETE
CASCADE,
fldStringUpr string(50,'English') NOT NULL METHOD('upper(fldString)')
)
I transformed method-Row to my SQL-String
cmd="CREATE TABLE Currencies ("
cmd=cmd+"CUR VarChar(504 ,'"+ValLang+"') NOT NULL UNIQUE INDEXED, "
cmd=cmd+"CURName VarChar(504 ,'"+ValLang+"') NOT NULL UNIQUE INDEXED,
"
cmd=cmd+"Ric VarChar(504 ,'"+ValLang+"') NOT NULL UNIQUE INDEXED, "
cmd=cmd+"Online ObjectPtr REFERENCES Online ON DELETE RESTRICT, "
cmd=cmd+"LastValue Long, "
cmd=cmd+"QuotationUnit ULong NOT NULL, "
cmd=cmd+"QuotationMode Boolean, "
cmd=cmd+"NValue Float METHOD('if(QuotationMode=1,
LastValue/QuotationUnit, 1/(LastValue/QuotationUnit)'), "
cmd=cmd+"Sortierung ULONG NOT NULL"
cmd=cmd+")"
count=tmpDB.SQlExecute(cmd)
But now Table is build. The Problem have to be in the METHOD-Line.
Could you give me a hint were I am running out of correctness? IS it
possible that after METHOD there is a blank necessary or after the
Mothod-brackets?
Thanks for help
Claudius
--
G4/733 QS / MacOS X 10.3.2de / RB 4.5.3de or 5.2.4/ Valentina 1.10.0
Homepage http://www.sailer-online.de/pub/RealBasic/
Download finale Versionen, Betaversionen auf der Homepage
More information about the Valentina
mailing list