Mark,
Sorry I left that information out. This select statement will be parameterized, but for now its not. The error message that I am getting is: Connectivity error:[Microsoft][ODBC SQL Server Driver][SQL Server] Incorrect syntax near the keyword 'desc'.
I know that desc is a reserved word, but I'm using an as clause and it's still not working.
Jim
>First, what is the error #/message? You can use AERROR() to get more information. Second, I would just create the remote view ONCE, and parameterize it.
>
>...WHERE PAIS_pomas.jobnum = ?nJobNum
>
>You can then open the view with no data in the DE of a form or anywhere else. Then set the variable (parameter) nJobNum to the needed value. Then issue REQUERY('ViewName') command to get the data. When the job # changes, TABLEUPDATE() on the view to save any changes (or TABLEREVERT()), before setting the new value of nJobNum then REQUERY again.
>
>Every time you successfully create the view, the view definition that currently resides in the DBC gets deleted [the DBC is a glorified table, so the view definitions records get deleted but not packed], then a whole new set of records are added to the DBC. Your DBC will bloat very quickly by doing this.
Thanks
Jim