Javier, as you know the SEEK and FIND commands require an index. Therefore, you could use those commands if, after creating the cursor with SQLEXEC, you make one or more index tags on the cursor.
For fairly small cursors (say, less than a few hundred records), you probably will get nearly as good performance using the LOCATE FOR command, which does not require indexes. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href=
Well, I know little of applications that require seach over LARGE indexed cursor, for example, interactive search in grid. Instead I usually make Search form, where you enter one or more search fields, run query and it returns result into grid. In my search query number of rows in result usually limited to 200..1000 records because when user really search something, he/she do not need much of result rows because search criteria allows to find something quikly. With SQL server it works VERY well. In addition, I made Interactive search for SQL Server that works ok too without downloading of large cursor locally.
When you build applications for SQL Server, you need to think by completely another way. With SQL Server often query to server is better way than download large data to local machine and work with it locally further. This because users usually do not use 99.9% of these data.
[sig]<p>Vlad Grynchyshyn<br><a href=mailto:vgryn@softserve.lviv.ua>vgryn@softserve.lviv.ua</a><br>[/sig]
That is the problem doesn’t allow my make the index after I set the properties of the cursor, only before.
And I don’t like the idea to make index each time a make a cursor, there is not other way to seek faster inside the cursor.
[sig][/sig]
I am using database views to connect to the sql table and right after i open the table i do my index on field tag field. It take a bit longer when i start the program but after that it works like a carm. I can use seek to my heart conent. Hope that help.
Paul, this is an advantage of views.
Javierp, if you decide to use views, you can open view with NODATA option, index it (this is very quick operation because view contains no records), and than use requery() to get data. Data will be indexed!
But I'm still thinking that retrieving large number of records from SQL servr is just bad approach or application architecture.
Anyway, you can use LOCATE without any indexes to find data. If cursor is not larger than 100000 records, you will have perfect speed. This is because data located locally - no data transfer through network when locating (compare to the file server applications).
Hope this helped.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.