Master /Detail problem using Sybase iAnywhere
From: Cameron Mathers (cmathers_at_whatsvanilla.com)
Date: 08/22/04
- Next message: Benny Joseph: "Re: A Simple Quick Report Problem...."
- Previous message: Dennis: "Re: Open method of ADO Stream Object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 22 Aug 2004 15:08:38 +1000
I have two adoQuery objects setup with a Master Detail relationship
Master Query:
SELECT ROW_ID, NAME
FROM V_DOC_STYLE
Detail Query:
SELECT ROW_ID, DOC_STYLE_ID, NAME
FROM V_STYLE_FONT
WHERE DOC_STYLE_ID = :ROW_ID
The ROW_ID columns are my Primary Keys for each table. They are defined in
the database to Autoincrement.
When I try to insert a record into the detail table (V_STYLE_FONT) I keep
getting the following error:
Field 'ROW_ID' cannnot be modified.
This error occurs on the INSERT command. I am not trying to set a value in
this field.
If I re-create my V_STYLE_FONT table and rename the ROW_ID column to
anything else. ie) ID. the problem is resolved.
I'm currently using Sybase Interactive SQL v9.01. (iAnywhere) previously
called Sybase SQL Anywhere as my database. I have recently migrated my
applications from MS SQL Server to Sybase iAnywhere. When running on MS SQL
Server I did not have this problem for the same query objects.
I would prefer to name all my Primary Key columns the same across all tables
for the purpose of maintaining a standard, so if any one could advise on how
I could resolve this I would much appreciate it.
Regards
Cameron Mathers
- Next message: Benny Joseph: "Re: A Simple Quick Report Problem...."
- Previous message: Dennis: "Re: Open method of ADO Stream Object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|