Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection to Backend
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01343807
Message ID:
01344192
Views:
30
This message has been marked as the solution to the initial question of the thread.
>>I stop using RVs immediately after VFP 8 comes and CAs was here :-)
>>try:
>>
>>OPEN DATABASE C:\sample\Data\myDBC.dbc
>>PUBLIC lnConn
>>lnConn = SQLCONNECT("myConn","sa","myPass")
>>
>>?lnConn     *:returns 1, so the connection succeeded 
>>
>>SELECT 0
>>USE myDBC!myRemoteView  CONNSTRING  lnConn  
>>
>
>I just started using Cursor adapters yesterday and they are a blast!!!!! The only thing is I am telling th Cursor adapter to use a connection handle store in a global var, is this a[proache ok??
>
>also, how do you parameterize a CA? justa as the RV?

Yes, they can use anything for DataSource:
lnSQLHAndler = SQLCONNECT().....


*** In CA Init or any other method:
this.DataSource = m.lnSQLHAndler
....
To make them use parameters just change your SelectCmd property:
this.SelectCmd = [SELECT * FROM YourTable WHERE SomeField = ?m.SomeVariable]
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform