V4MD request

info at vallemediatime.com info at vallemediatime.com
Tue Jun 21 16:58:38 CDT 2005


----- Original Message -----
From: "Ruslan Zasukhin" <sunshine at public.kherson.ua>
To: <valentina-beta at lists.macserve.net>
Sent: Tuesday, June 21, 2005 4:50 PM
Subject: Re: V4MD request


> On 6/21/05 5:38 PM, "info at vallemediatime.com" <info at vallemediatime.com>
> wrote:
>
> >>> differences about API-SQL
> >>> I'm still tried my project with more API calls; at beginning (V2.0.1)
it
> >>> seems to me that API was more slowly... now is better but not how SQL
query.
> >>
> >> Hmm. You say that for you API way works slower of SQL ???
> >> This is not true.
> > I say that: "for get data from db and show it in a grid is more
slowly... or
> > more probably I use a non optimizing script...
> > N.B. sprite(n) contains cXtraStringGrid
> >
> > on ProduceTableData (n, rs, table)
> > myData = []
> > fieldCount = table.fieldCount
> > -- GRID COL HEADERS
> > sprite(n).colCount = gHeaderList.count
> > sprite(n).SetRow(0, string(gHeaderList))
> > -- TABLE ROWS
> > recCount = rs.itemCount
> > if recCount > 0 then
> > iter = rs.makeNewIterator()
> > if iter.firstItem() then
> > repeat with i = 1 to recCount
> > row = []
> > table.RecId = iter.value
> > repeat with j = 0 to gHeaderList.count
> > f = table.field(j)
> > row[symbol(f.name)] = f.value
> > sprite(n).SetCellText(j, i, string(f.value))
> > end repeat
> > myData[i + 1] = row
> > iter.nextItem()
> > -- GRID ROWS
> > sprite(n).rowCount = myData.count
> > end repeat
> > end if
> > end if
> > sprite(n).ColAutoSize()
> > end
>
> And how looks SQL ?

on updateGrid n
sprite(n).SetRow(0, string(gHeaderList))
recCount = value(member("recCount").text)
sprite(n).rowCount = RecCount +1
sprite(n).colCount = gHeaderList.count
-- we fill the grid row by row
repeat with i = 1 to RecCount
fields = gCursor.getRecord(i)
sprite(n).SetRow(i,string(fields))
end repeat
sprite(n).ColAutoSize()
end

more simple and fast
Paolo


> --
> 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]
>
>
> _______________________________________________
> Valentina-beta mailing list
> Valentina-beta at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-beta
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.7.8/22 - Release Date: 17/06/2005
>
>



More information about the Valentina-beta mailing list