[V4RB] Cannot make a method work

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Mar 16 22:53:41 CST 2003


on 3/16/03 8:58 PM, Richard Altenburg at valentina at brainchild.nl wrote:

> As a very new Valentina-user I feel stupid enough now I cannot make a
> BaseObject method get to work.
> 
> I have defined my database and tables through classes in my REALbasic
> project. I have made a property 'servername' which is of type VString, and
> another one 'servername_lower' as VString.
> 
> The lower version must have a method 'LOWER(servername)', so that it is
> filled with a lowercase version of what is in field 'servername'. That way I
> can sort on the servernames and get a result identically to when REALbasci
> sorts this names (case-insensitive, that is).
> 
> But where ever I put the SetMethod, it just returs a Nil when I try to use
> the field 'servername_lower; in a SQL select.
> 
> I have removed the database from disk, and put the commands before the
> create of it, but with no luck. I have put them in the constructor of the
> class of the base object, also no luck.
> 
> Where should this stuff be?

1) Please note that in REALbasic we can have name servername_lower
But in TABLE we can have even other name.
The last name is defined in constructor of field

    servername_lower = new Vstring ("servername_lower", 50 )
   ^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^
                                    This name is used in SQL.

    this name is used in RB code


So check if you have assign correct name for field.


2) other way. After you have CREATE db from your RB app,
 close db and quite app.

Open this db in VAPP and check what you have create.
Check if servername_lower field exists. Check its formula.
You can even go to Record Browser, add few records and check how method
works. (to see methods choose from menu "Show Methods")


-- 
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://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list