Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Progress bar while extracting data via odbc
Message
From
30/05/2008 12:44:29
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
DB2
Miscellaneous
Thread ID:
01320603
Message ID:
01320624
Views:
13
Actually it brings 3046 records that are stored on that table, the 10000 is just for testing purposes.
Thanks anyway, if you run any sqlselect via odbc from command window in vfp you can see a progress bar, i need to recreate this in my app

>I didn't try this technique myself, but may be you need to specify smaller size ?

>thanks Naomi, but this code dont let me add a progress bar to know when the sql sentence is going to finish... do you understand what i mean?
>
>nn = SQLStringConnect("Driver=SQL Server;Server=192.168.0.91;Database=instock;UID=john;"+;
> "PWD=1234;")
> CLOSE ALL
>CREATE CURSOR hits(numero i)
>&& Change the FetchAsNeeded option default value
>CursorSetProp("FetchAsNeeded",.T.,0)
>
>&& Updated based on the thread FetchAsNeeded SPT blocking remote views? Thread #1145681 Message #1145743
>CURSORSETPROP("AllowSimultaneousFetch",.T.,0)
>CursorSetProp("FetchSize",10000,0)
>
>&& FetchAsNeeded option requires asynchronous connection for SPT cursors
>SQLSetProp(nn,"Asynchronous",.T.)
>
>xx=1
>do while NOT USED("MyResult") && SQLEXEC() will return 0 till all records
> && fetched and returned to client. So,
> && when you want to fetch, just wait till alias created with
> && first FetchSize number of records (300 in this sample)
>=SQLExec(nn,"SELECT * FROM products","MyResult")
>INSERT INTO hits values(xx) &&here i need to put something like 23%,24%, etc.
>xx=xx+1
>enddo
>
>* return the default option value to .F.
>CursorSetProp("FetchAsNeeded",.F.,0)
>SQLDISCONNECT(nn)
>SELECT hits
>brow
John Harold Belalcázar Lozano
Associate Director Of Development
http://www.belvicto.co/
jhbelalc@gmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform