Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I use SQLPrepare with remote views
Message
From
28/07/2003 22:34:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Can I use SQLPrepare with remote views
Miscellaneous
Thread ID:
00814409
Message ID:
00814409
Views:
45
Hi all,

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
Next
Reply
Map
View

Click here to load this message in the networking platform