Cannot update a complex query with more then one table
Posted: 11.01.2011, 17:34
Hello!
I have an Oracle database with three users/schemas. The three schemes have similar structures. I'll call them Joe, MAX and RYO.
My application access the database using the component TZConnection.
In particular form have a TZQuery with a simple SQL:
The user clicks the ADD button and the query is placed in insert mode:
After filling out the information the user clicks the save button and runs POST:
Accessing the application with the JOE user when performing the insertion everything runs normally.
With the MAX user error is raised in the DefineTableName method of the class TZGenericCachedResolver in unit ZDbcGenericResolver:
"Can not update a complex query with more then one table"
When traveling in Metadata property, there are two schemes: JOE and MAX. The EXAMPLE table exists in both schemes.
Then I accessed the application with the user RYO. In the first test, we found the method TZGenericCachedResolver.DefineTableName JOE schemes and MAX, but not the schema RYO. And the error was raised:
"Can not update a complex query with more then one table"
After I changed the SQL statement to fetch the fields explicitly:
When running the insertion error not occurred, but the record was inserted in the scheme JOE.
I tried to debug the code to identify a possible bug, but without success.
The Lords could help me?
Josimar Zimermann
I have an Oracle database with three users/schemas. The three schemes have similar structures. I'll call them Joe, MAX and RYO.
My application access the database using the component TZConnection.
In particular form have a TZQuery with a simple SQL:
Code: Select all
SELECT * FROM EXAMPLE
Code: Select all
Query.Insert;
Code: Select all
Query.Post;
With the MAX user error is raised in the DefineTableName method of the class TZGenericCachedResolver in unit ZDbcGenericResolver:
"Can not update a complex query with more then one table"
When traveling in Metadata property, there are two schemes: JOE and MAX. The EXAMPLE table exists in both schemes.
Then I accessed the application with the user RYO. In the first test, we found the method TZGenericCachedResolver.DefineTableName JOE schemes and MAX, but not the schema RYO. And the error was raised:
"Can not update a complex query with more then one table"
After I changed the SQL statement to fetch the fields explicitly:
Code: Select all
SELECT CD_EXAMPLE, DS_EXAMPLE, NM_EXAMPLE FROM EXAMPLE;
I tried to debug the code to identify a possible bug, but without success.
The Lords could help me?
Josimar Zimermann