Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursorfill or requery()?
Message
De
27/10/2003 11:20:26
 
 
À
26/10/2003 14:50:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00842623
Message ID:
00842989
Vues:
26
Hi Aleksey

Thank you for your advices and your time. I resolve my problem.
I set the propertie prepare= .F. and include the following code
in a method in my class form. I call this method from dataenvironment
beforeopentables event.


***********/method ambientedatos/***********
***********/ Set up cursoradapters /**************
TRY
CLOSE DATABASES ALL
=AMEMBERS(aCursor,THISFORM.DATAENVIRONMENT,1)
=ASORT(aCursor,1)
nPosInic=ASUBSCRIPT(aCursor,ASCAN(aCursor,"Object"),1)
FOR nCount = nPosInic TO ALEN(aCursor,1)
**************/ verifica si es objeto/***********
IF aCursor(nCount,2)="Object"
cObj="Thisform.DataEnvironment."+aCursor(nCount,1)
loCursor=EVALUATE(cObj)
cObjClass = loCursor.Class
cObjAlias = loCursor.Alias
IF loCursor.Class="Cursoradapter"
m.lnNewHandle=SQLCONNECT(gnHandle)
loCursor.Prepared=.F.
loCursor.DataSourceType="ODBC"
loCursor.Datasource = m.lnNewHandle (loCursor.Datasource)
ENDIF
ELSE
EXIT
ENDIF
ENDFOR

CATCH TO loException
MESSAGEBOX(Exception_Error(loException),0+16,THISFORM.CAPTION)
FINALLY

ENDTRY


A couple of questions:

1. Do I get more perfomance if I use prepared = .T.?

2. In the builder when I use ODBC connection I can´t see the SQLServer
views only the tables, so, when I want the views I set to ADO,
got the view and change to ODBC. Is this a bug in the builder?.

Thank you

Carlos
Carlos A. Miranda
E.I.S.lnc
President
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform