Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I use SQLPrepare with remote views
Message
De
29/07/2003 23:18:24
 
 
À
29/07/2003 13:22:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00814409
Message ID:
00814799
Vues:
10
Thank you for the feedback Aleksey.

Again, I have additional questions on your feeback.

1. Does this mean that I don't need to call the SQLPREPARE() function?

>You should set "Prepared" property for the view:
>DBSETPROP("viewname","VIEW","Prepared",.T.)
>

2. When parameters change, how do I "prepare" the backend result? Do I issue another DBSETPROP() or CURSORSETPROP() before REQUERY()?

>>Can I use SQLPrepare with remote views as such:
>>
>>
>>* assume a database is open
>>* assume tables: saleshist & prods exist
>>cYearWeeks = "200301#200302#200303"
>>cSQL = "select prodid,prods.name,yearweek,sold from saleshist,prods "+;
>>       "where yearweek=?cYearWeek"
>>
>>sqlprepare(oApp.ConnectionHandle,cSQL) && does this help speed up the query?
>>cursorsetprop("Prepared", .t., 0)
>>
>>create sql view (cViewName) remote connection (cConnName) shared as &cSQL
>>use (cViewName) in 0 alias myRV
>>
>>alines(aWeeks,cYearWeeks,.t.,'#')
>>for i = 1 to alen(aWeeks)
>>   cYearWeek = aWeeks[i]
>>   * is sqlprepare useful here?
>>   requery("myRV")
>>endfor
>>
ramil
~~ learning to stand still
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform