add a record

Sylvain Perque sylvain.perque at ac-reims.fr
Fri Jun 30 18:09:58 CDT 2006


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



More information about the Valentina mailing list