V4REV Copy Cursor to New Table

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sun Jun 10 06:33:33 CDT 2012


On 6/10/12 10:36 AM, "Marek Niesiobedzki" <nm at studionm.pl> wrote:

Hi Marek,

Yes I see such function in sources of V4REV, with such header

// put Valentina_CopyCursorToNewTable(
//    SourceCursor,
//    TargetDatabase,
//    NewTableName,
//    [inNewTableStorage = EVStorageType.kDefault,
//    inIntCopyRecords = TRUE] ) into tblRef

So you can try call it.  Should work ...


Right now I will add couple of sentence into WIKI
About 
  Valentina.Init() must be called before this of course
    because we create new LOCAL RAM db ...
    so works not VCLIENT.dll, but VKERNEL.dll


> In the Valentina Viki is described method Valentina.CopyCursorToNewTable()
> with example:
> 
> ' Let db1 is a remote database under some Valentina Server.
> VCursor curs = db1.SqlSelect(
>     "SELECT * FROM tblPerson WHERE fldAge = 25 and fldIsMarried = false",
>     kClientSide, kReadOnly )
>  
> ' Create RAM based TMP database on client side:
> VDatabase pLocalRamDB = new VDatabase( kRAM )
> pLocalRamDb.Create( "DummyNameForRamDB" )
>  
> VTable pTblNotMarried25 = Valentina.CopyCursorToNewTable( curs, pLocalRamDB,
> "tblNotMarried25" )
>  
> ' We can destroy cursor now, if it will not be used anymore.
> curs = nil
> 
> How to use it in V4REV? Is it possible to use it in SQL way?
> 
> Marek

-- 
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-beta mailing list