Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection String DBC Question
Message
 
À
26/11/2008 14:15:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01364238
Message ID:
01364269
Vues:
19
>Boris,
>
>There may just be a gap in my knowlege. But, here is why I think I need the connection string in the DBC kept up to date. I use a lot of remote views that are listed in my form's Data Environment so when I open a form, it automatically opens all of the views needed by the form. On occasion when I need the form to reference a different set of data than what is in the the DE, I have successfully "re-USED" a remote view by referencing a new connection string with the CONNSTRING keyword of the USE statement. Although, I have never tried it, I read where you can turn of the "auto opening" of the views by the data environment and I guess I could manually open and close the views and by using connection strings from a table or INI file but I like this "auto" feature since it also handles closing views when I exit the form.
>
>Am I missing something? Is there a way to get the DE to use a connection string (on the fly) rather than what is stored in the DBC?
>
>Robert

Not sure, I have to do a little research here.
I dropped using the Views when CAs come to horizon :-)

BTW if you use Private DataSession for forms ALL Tables/Cursors/Views opened in that DS are closed when the session is closed, no matter WHERE you opened them, in DE or manually during the some code execution.

You could use this:
DBSETPROP([ConnectionName],"CONNECTION","ConnectString",The string here)
in BeforeOpenTables event of the DE. Not sure at all if this will work though :-)
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
Répondre
Fil
Voir

Click here to load this message in the networking platform