deleteAllRecords()

Florian Bogeschdorfer fb at memedia.de
Sun Oct 19 23:27:10 CDT 2003


Hi Ruslan,

My Valentina application worked fine for a few days until my client choosed
the function where deleteAllRecords() was used. Since then the table
obviously does not accept adding records anymore

c= new(xtra "vCursor", GetRef(VAL[#ID]), "SELECT * FROM Z_DAY",2,1,2)

-- <Xtra child "VCursor" 2 269800c>
put valcursorreccount(c)
-- 8

put valaddrecord("Z_DAY",[#Z_DAY_Umsatz:123.0])
-- 1
c=0
c= new(xtra "vCursor", GetRef(VAL[#ID]), "SELECT * FROM Z_DAY",2,1,2)
put valcursorreccount(c)
-- 8

See the log:

23:12:01.215000 (2368): (668) SQL: select RecID, * from Z_DAY; # of records:
8
 23:12:01.215000 (2936): (668) CURSOR(e55e00): FirstRecord : OK
 23:12:01.215000 (2936): (668) CURSOR(e55e00): Adding record #9: OK
 23:12:01.225000 (3000): (668) Flushing 'me-inside' database: OK
 23:12:17.017000 (2936): (668) SQL: SELECT * FROM Z_DAY; # of records: 8
 23:12:17.017000 (2936): (668) CURSOR(e54cc0): FirstRecord : OK
 23:12:39.089000 (2392): (668) Flushing 'me-inside' database: OK
 23:12:43.926000 (2936): (668) SQL: SELECT * FROM Z_DAY; # of records: 8
 23:12:43.926000 (2936): (668) CURSOR(e55e00): FirstRecord : OK

It should be nine by now. But there was NO error returned!!!

I am on a42, V4MD and of course the cursor was not locked


I try changing a record now...OK

c= new(xtra "vCursor", GetRef(VAL[#ID]), "SELECT * FROM Z_DAY",2,1,2)
Put valcursorreccount(c)
-- 8

-- 8
put deleteAllRecords(c)
-- 1
C=0
c= new(xtra "vCursor", GetRef(VAL[#ID]), "SELECT * FROM Z_DAY",2,1,2)
Put valcursorreccount(c)
-- 8


Another table:

c= new(xtra "vCursor", GetRef(VAL[#ID]), "SELECT * FROM
BUCHUNGEN_PLUtable",2,1,2)

put valcursorreccount(c)
-- 2488
put deleteAllRecords(c)
-- 1
put valcursorreccount(c)
-- 0
c=0
c= new(xtra "vCursor", GetRef(VAL[#ID]), "SELECT * FROM
BUCHUNGEN_PLUtable",2,1,2)
put valcursorreccount(c)
-- 0
put valaddrecord("BUCHUNGEN_PLUtable",[#BPL_Name:"Hallo"])
-- 1
c=0
c= new(xtra "vCursor", GetRef(VAL[#ID]), "SELECT * FROM
BUCHUNGEN_PLUtable",2,1,2)

put valcursorreccount(c)
-- 1

It WORKS HERE, WHY NOT ON THE OTHER TABLE.

RUSLAN, IGOR, SERIOUSLY, THERE IS A PROBLEM WITH THIS FUNCTION. I would like
to send you the database (about 100 K), so you can look why I can not add
records to the table...

Best regards, Florian



More information about the Valentina mailing list