Fast reading?

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sat Apr 10 06:05:37 CDT 2010


On 4/10/10 12:48 PM, "Thomas Flemming" <tf at ttqv.com> wrote:

> Its not filling another table, I just need them into a .net-object/variable.
> And so I'm doing
> 
> for i =0 to cursor.recordcount
>    cursor.Position = i
>    f(i).a1 = cursor.fields("f1").value
>    f(i).a2 = cursor.fields("f2").value
>    f(i).a3 = cursor.fields("f3").value
> next
> 
> 
> I had the same problem, when writing the data into the table:
> for i =0 to f.count
>    table.setblank
>    table.fields("f1").value = f(i).a1
>    table.fields("f2").value = f(i).a2
>    table.fields("f3").value = f(i).a3
>    table.addrecord
> next
> 
> which was also quiet slow, but this could be solved with data binding, which
> is much faster:

Do you work with LOCAL db or REMOTE ?

SQL and binding can be faster only for vserver ...

 
> SqlExecute("INSERT INTO [mytable] (f1, f2,..,fx)
>              VALUES ( :1, :2,..,:x)", myarray)
> 
> So I was hoping that there is also something with data binding to read a whole
> record quickly into a .net-object/variable

If you work with vserver, then I think you use Server side cursor

Try to use client side cursor, it is faster.

Client side is good choice if you only read, and selection is not huge

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