***********/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
CarlosCarlos A. Miranda
E.I.S.lnc
President