main logo
Subject: Re: SQL string functions
Author: Ruslan Zasukhin
Posted: 2002/06/25 14:41:38
 
View Entire Thread
New Search


on 6/25/02 18:14, Carlo Sacchetti at carlo.sacchetti /at/ tin DOT it wrote:

> Hello Ruslan,
> I need understand how I can use string function ("locate") of SQL with
> Valentina. The manual have a exemple like this:
> locate('bar','foobarbar')
>
> Now I don't understand how I have to insert it in my string of SQL in
> valentina.
> Exemple:
> myCursor = new(xtra "VCursor", getRef(gDB), "Select trova from paragrafi where
> testo like 'amore'")
>
> It is very important for me to learn this function.
> Can you help me? Can you send me a more precise exemple?

Hi Carlo,

To use this function (as any other) first of all you need create BaseObject
method (virtual field).

In your case it must be added into table "paragrafi".

Let this field will have name "mLocate".

Then to use it in SQL write

query = "SELECT .. FROM paragrafi WHERE mLocate = 3"


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

To subscribe to the Valentina mail list
send a letter to valentina-on /at/ lists DOT macserve.net
-------------------------------------------------------------
 
©2002 Ruslan Zasukhin
<-- Prior Message New Search Next Message -->