Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection String DBC Question
Message
From
26/11/2008 14:15:56
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01364238
Message ID:
01364257
Views:
15
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


>>Why?
>>If you switched to use Connection string then keep the connection string OUT of the DB. You could use table, INI file or registry to >>keep your connection string (of course w/o any sensitive data as User Name and Password)


>In the past, I've created DSN connections and created a reference to the DSN in the "connections" section of the Project/Database. However, I have recently started using "connection strings" instead of a DSN stored on the local computer. I have figured out that the connection string info gets saved in the DBC. I have been able to locate the string info in the "Property" memo field, if I USE the DBC. However, I see that the data is compiled in some way and is not just plain text.
>
>I would like to put the connection string info in a table and have the application check for changes in the .DBF to see if anything has changed from what is stored in the "Property" memo field and, if it has, update the "propery" field. My question is this: Am I going to run into problems if I try change (udate) this compliled data programically in the DBC. Any "hints" or "gotchas" on how to do this?
>
>Thanks,
>Robert Wright
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform