I hope you are doing this in a local DBC that is only used by the currently running app. If not, and you are doing this to a shared DBC, then this is a very bad idea. Your DBC files will bloat out of control.
After you create the view, use the INDBC() function to see if the view was created. If not either release the form and/or try again.
>Hi,
>
>Within my forms, I create one or several views with this command:
>
>CREATE SQL VIEW &pcSQLVueName ;
>REMOTE CONNECTION &pcSQLVueCon ;
>SHARE AS &pcSQLVue ;
>WHERE &pcSQLVueWhere ;
>ORDER BY &pcSQLVueTri
>
>9 out of 10 my views are created without problem but sometimes, my view are not created then my forms crash.
>
>I'm looking for something to set to eliminate this problem.
>
>Any suggestion would be appreciate.
>
>bye
Mark McCasland
Midlothian, TX USA