A few questions

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Oct 20 15:41:22 CDT 2003


on 10/20/03 13:33, Ian Devaney at idevaney at mac.com wrote:

Hi Ian,

> I'm just starting my first Valentina project for while and have some
> questions regarding changes since I Iast used it seriously.
> 
> Am I right in thinking that I should now user cursors - rather than
> baseObjects - for updates?

In the past this was true also.
BaseObject API was always under warn.
 
> If this is the case, what about creating records?

The same,

Just keep in mind -- Cursor API can work with Vserver.
BaseObject API cannot. Only with local db.

> Let's say I have some code I use for creating a new record. It uses
> "setBlank" on the baseObject and then populates it with values before
> calling "addRecord".
> 
> In the past, I could use the majority of this code - the bit that
> populates the table/baseObject - in my update routine. What happens now
> if I have to use a cursor for the update part?

You still can use BaseObject API,
But only for local db

To use cursor you do
    
    curs = "SELECT ... FROM T WHERE RecID = 0 "
    
    curs.SetBlank()

    set fields:

    curs.AddRecord()

Very similar to BaseObject API.


> Also, my project is likely to end up running on vServer.

Then no doubts you need switch to cursor API and SQL.

> However, I am doing most of the early development using the regular RB plugin
> and methods. I know about the differences when creating db's etc. Is this a
> safe thing to do and are there any other pitfalls I should be aware of when
> working this way?

IF you use only cursor then to jump to Vserver you need change just only
line with db.Create().


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