Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Practices to Improve CursorAdapter Speed
Message
From
14/02/2006 14:52:57
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01094765
Message ID:
01096286
Views:
24
CursorAdapter calls ADO via early binding. The code below doesn't use early binding for ADODB.Field objects, you need to use GETINTERFACE function on whatever .Item(...) returns.

Aleksey.



>Hi Aleksey
>
>My mistake I had told the tech. support at ADS that it was a problem with the connection type. So why I said UNICODE here I do not know. I guess headcolds and testing are not a good combination.
>
>Another questions is does the cursoradpater class use early binding for ADO? I began all this testing to find a way to speed up the cursoradpater class with ADO over the Internet.
>
>Below is the code I used for early binding.
>
>Thanks,
>Simon
>
>
>Local lnSec1,lnSec2,lnSec3,lnSec4,lnSec5,loDI,loCI
>Local loC As ADODB.Connection
>Local loD As ADODB.RecordSet
>lnSec1=Seconds()
>loC=CreateObjectEX("ADODB.Connection","","")
>loCI=GetInterface(loC,"_Connection")
>loCI.ConnectionString="Provider=Advantage OLE DB Provider; Data Source=\\server1\apps\ads\FOPro.add; User ID=adssys; Password=teeka;"
>loCI.CursorLocation=2
>loCI.Open
>lnSec2=Seconds()
>*loDI=loCI.Execute("Select * From UPDatDic")
>loD=CreateObjectEX("ADODB.RecordSet","","")
>loDI=GetInterface(loD,"_RecordSet")
>loDI.Open("Select * From UPDatDic",loCI,0,3)
>lnSec3=Seconds()
>
>Use dbf\updatdic
>Copy Structure to tmp\updatdic
>Use tmp\UPDatDic
>With loDI.Fields
>   lnSec4=Second()
>   loAllowNull=.Item("AllowNull")
>   loAType=.Item("AType")
>   loAutoInc=.Item("AutoInc")
>   loBackColor=.Item("BackColor")
>   loBoundCol=.Item("BoundCol")
>   loCDXFilter=.Item("CdxFilter")
>   loCDXKey=.Item("CDXKey")......
>
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform