Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practices to Improve CursorAdapter Speed
Message
 
À
14/02/2006 14:52:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01094765
Message ID:
01096382
Vues:
23
Hi Aleksey

Since early binding is all new to me do you mean the following?

local loAllowNull as ADODB.Field

loAllowNull=GetInterFace(.Item("AllowNull"))

If this is incorrect can you include a short example.

Thanks,
Simon White

>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")......
>>
>>
>>
Simon White
dCipher Computing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform