>Hello Cetin,
>
>>use myDatabase!myView connstring "driver=...."
>
>I can see how this would help if you USE the view. However, what about when the views are opened automatically in the various form's DEs. In point of fact, there are no views that are opened via the USE command.
>
>If you have any other advice on this point, it would be appreciated.
>
>Regards,
>
>Angie.
More than one advices:)
From VFP help:
"Naming Precedence for Connections and Data Sources
When you use the CREATE SQL VIEW command with the CONNECTION clause, you specify a name that represents either a connection or a data source. Visual FoxPro first searches the current database for a connection with the name you specified. If no connection with the specified name exists in the database, then Visual FoxPro looks for an established ODBC data source with the specified name. If your current database contains a named connection with the same name as an ODBC data source on your system, Visual FoxPro will find and use the named connection."
1) Create connection command is available. You could create a database on the fly and add a named connection to it (BeforeOpenTables).
2) ConnectString property is read-write.
3) You've VFP8,right? If so you could create DE in code as a class even on the fly.
4) You could use CursorAdapter.
5) You could create a dbc, connection and views on the fly.
Cetin