main logo
Subject: Re: add a record
Author: "Sylvain Perque"
Posted: 2006/06/30 11:09:58
 
View Entire Thread
New Search


Well, in fact, if I close the database in the next picture of the timeline
in director, there is no error.
Director seem to need time to add record before close database. It is a tiny
database.

Missed 1 line.
> Hi,
> I can't find what i do wrong. A error occure after I close the base.
> If I keep it open, there is not error.
> The code for one field :
> ---------------------------------------------------------------------
> Valentina = new (Xtra("Valentina"))
> Valentina.Init(200 * 1024, "", "")
> gDb = new (Xtra "VDatabase", #kLocal)
> gDb.open("My Path\Name of my db.vdb")
> -- To add records to the table we need build a cursor using SQL query.
> query = "select * from Resultats WHERE false"
> -- This is the new way to build a cursor
> gCursor = gDb.sqlSelect(query, #kServer, #kReadWrite, #kRandom)
> tblRes = gDb.table("Resultats")
> vTDBNom = tblRes.field("TDBName")
vTDBNom.value = "My Name"
> RecID = tblRes.addRecord()
> tblRes.flush()
>
> -- close
> gCursor = void
> gDb.close()
> gDb = void
> if objectP(Valentina) then
> -- When we finish work with Valentina engine we should shutdown it.
> Valentina.shutDown()
> end if
> -----------------------------------------
> thanks to help a so newbie.
>
> Sylvain
>
> --
> Ce message a été vérifié par MailScanner
> pour des polluriels (SPAM) et rien de
> suspect n'a été trouvé.
>
> _______________________________________________
> Valentina mailing list
> Valentina .at. lists DOT macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>


--
Ce message a été vérifié par MailScanner
pour des polluriels (SPAM) et rien de
suspect n'a été trouvé.

_______________________________________________
Valentina mailing list
Valentina@lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina


--
Ce message a été vérifié par MailScanner
pour des polluriels (SPAM) et rien de
suspect n'a été trouvé.

_______________________________________________
Valentina mailing list
Valentina .at. lists DOT macserve.net
http://lists.macserve.net/mailman/listinfo/valentina

 
©2006 Sylvain Perque
<-- Prior Message New Search Next Message -->