Question to Methods

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Feb 24 21:46:48 CST 2004


on 2/24/04 9:29 PM, Claudius Sailer at Claudius at sailer-online.de wrote:

> 
> 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?

No, spaces are not important.

Strange it seems all right.

You get some error code?


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list