PRB: Base Table Fields Changed with Remote View (191344)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Data Access Components 2.5
This article was previously published under Q191344 SYMPTOMS
When issuing a REQUERY command against a remote view, while a second remote
view is being USEd, the following error message appears:
Base table fields have been changed and no longer match view fields.
View field properties cannot be set.
CAUSE
This behavior occurs when two or more views are defined with the following
attributes:
- The views were created using the same named connection to a remote data
source.
- The views were created using the SHARED clause in the CREATE SQL VIEW
command.
- The Prepared property of the views is set to .T.
RESOLUTION- Do not include the SHARED clause in the CREATE SQL VIEW command used to
create the remote view:
CREATE SQL VIEW "MYVIEW1" ;
REMOTE CONNECT "CONN1" ;
AS SELECT * ;
FROM mytable_a
DBSETPROP('MYVIEW1', 'View', 'Prepared', .T.)
CREATE SQL VIEW "MYVIEW2" ;
REMOTE CONNECT "CONN1" ;
AS SELECT * ;
FROM mytable_b
DBSETPROP('MYVIEW2', 'View', 'Prepared', .T.)
- Create a separate connection for each of the views:
CREATE CONNECTION CONN1 DATASOURCE 'CONNECT' USERID 'SA' PASSWORD ''
CREATE CONNECTION CONN2 DATASOURCE 'CONNECT' USERID 'SA' PASSWORD ''
CREATE SQL VIEW "MYVIEW1" ;
REMOTE CONNECT "CONN1" SHARED ;
AS SELECT * ;
FROM mytable_a
DBSETPROP('MYVIEW1', 'View', 'Prepared', .T.)
CREATE SQL VIEW "MYVIEW2" ;
REMOTE CONNECT "CONN2" SHARED ;
AS SELECT * ;
FROM mytable_b
DBSETPROP('MYVIEW2', 'View', 'Prepared', .T.)
- Use the default PREPARED property:
CREATE SQL VIEW "MYVIEW1" ;
REMOTE CONNECT "CONN1" ;
AS SELECT * ;
FROM mytable_a
USE MYVIEW1 IN 0
CREATE SQL VIEW "MYVIEW2" ;
REMOTE CONNECT "CONN1" ;
AS SELECT * ;
FROM mytable_b
STATUS
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
REFERENCES
For additional information, please see the following article in the
Microsoft Knowledge Base:
178760 HOWTO: Alter the Properties of a View at Run Time
Modification Type: | Minor | Last Reviewed: | 3/3/2005 |
---|
Keywords: | kbcode kbDatabase kbpending kbprb KB191344 |
---|
|