delete a record

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Apr 4 13:46:51 CDT 2007


On 4/4/07 10:28 AM, "Sylvain Perque" <sylvain.perque at ac-reims.fr> wrote:

Hi Sylvain,

If things are simple then please prepare simple project that reproduce
problem, and report it into Mantis.
 
Because reading below text, I do not see anything I can advice.

> Well, when I said a TEXT field, in that field there's only a word, for
> exemple a name.
> The sort works if I delete nothing in the database.
> But when I delete something I can't sort properly with the TEXT field, and I
> can't sort properly with DATETIME field for all new records created by my
> program.
> I am sure I do something wrong when I delete a record, and I really need
> some help.
> 
> Here is the operations I do :
> 
> -- init
> Valentina = new (Xtra("Valentina"))
> Valentina.Init(3 * 1024 * 1024, "", "")
> gDb = new (Xtra "VDatabase", #kLocal)
> gDb.open("myPath\nameOfDatabase.vdb")
> query = "select * from nameTable ORDER BY TDBDateTime"
> gCursor = void
> gCursor = gDb.sqlSelect(query, #kServer, #kReadWrite, #kRandom)
> 
> -- pTDBNom = gCursor.field("TDBNom")
> -- pTDBPrenom = gCursor.field("TDBPrenom")
> -- pTDBClasse = gCursor.field("TDBClasse")
> pTDBDate = gCursor.field("TDBDateTime")
> -- pTDBTexte = gCursor.field("TDBTexte")
> -- pTDBIndexTxt = gCursor.field("TDBIndexTxt")
> 
> -- Go to the first record.
> gCursor.firstRecord()
> 
> repeat while ... --here I test the date I want to delete, using pTDBdate
> gCursor.NextRecord()
> end repeat
> 
> -- when I find the record, I delete it
> gCursor.deleteRecord()
> 
> gDB.flush()
> gCursor = void
> gDb.close()
> gDb = void
> Valentina.shutDown()
> 
> 
> I know I can do better with a better query, but can you see what appen ?
> I only do simple things.
> Thanks.
> Sylvain


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