Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection to Backend
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01343807
Message ID:
01344192
Vues:
31
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform