Progress being made - need more help.

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sat Sep 12 09:39:13 CDT 2009


On 9/12/09 9:37 AM, "Greg Olson-Hyde" <greg at hawkmount.com> wrote:

> Hi All,
> 
> First up, thanks to everyone who has helped me so far. When attempting
> to compile my app using Valentina, I have managed to get the errors
> down from 747, to 157 - a great sense of satisfaction - due to the
> help offered by you all.
> 
> The next step for me is to understand how to deal with with the cursor
> regarding records. The following are what I use in SQLite but don't
> seem to have equivalents in Valentina:
> 
> RecordSet.Edit
> 
> RecordSet.InsertRecord
> 
> RecordSet.Commit - Is UpdateRecord the same as Commit?
> 
>  From what I have read Valentina does not deal with VCursor in the
> same way as SQLite deals with a RecordSet in RB - but I can't figure
> out how!

Hi Greg,

Analog of RecordSet.InsertRecord() is
    Vcursor.AddRecord.

Regular form is next:

//
// Lets get EMPTY cursor which is ReadWrite.
//
Curs = db.SqlSelect( "SELECT * FROM T WHERE RecID = 0", kServerSide,
kReadWrite )


// FIRST STEP is to make its record buffer to be blank.
// Required only for AddRecord(). Should not be used with UpdateRecord()
Curs.SetBlank()


// Now you can assign fields

Curs.ULongField("name").value = XXX
...

// And now you can AddRecord to table
Curs.AddRecord()


// Valentina do not have Commit(), instead use db.Flush().
Db.Flush()






-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list