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:
01344275
Vues:
21
This message has been marked as a message which has helped 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]
>>
>
>
>I have a question regarding CA.
>
>Right now, since I am a newbie, I am creating the CA as I need on the DE of the form, but... What if I need exactly the same CA in other form?
>
>do I have to creat it everytime I need it? is there any way to store it on the DATABASE DBC and then Add it to the DE?

I generally write my CA's as a prg based class, and then instanciate the class in the load event of a form or whereever needed.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform