>I have an app with 2 databases. I'm trying to add a view to the second one (a local repository) but every time I set up the view, it attaches to the first dbc. I've tried selecting the 2nd dbc and then adding; selecting another view in that dbc and then adding; etc. Obviously I added the first couple of tables/views without problem. So what am I doing wrong now? Also, is there any way to "move" a view from one dbc to another?
Are you explicitly setting the 2nd DBC, as in:
SET DATABASE TO SecondDBC
before creating the view?
Maybe try this:
CLOSE DATA ALL
OPEN DATA SecondDBC
then create the view.
As far as copying the view, I use Stonefield Database Toolkit. But you can try this:
SET DATABASE TO FirstDBC
lcSql = DBGETPROP("ViewName", "VIEW", "SQL")
SET DATABASE TO SecondDBC
CREATE VIEW ViewName AS &lcSql
Chris McCandless
Red Sky Software