Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Add record to related table?

Quote Reply
Add record to related table?
Is it possible to add a record to a related table? i.e. I have 2 tables in my database, table A and B. Table A is the primary table and table B is related to table A. I want to know if I can add data to table B.
Quote Reply
Re: [useruseruser] Add record to related table? In reply to
You can access two tables at the same time by the URL below:
db.cgi?db=primary_db&sdb=related_db

TheStone.

B.
Quote Reply
Re: [TheStone] Add record to related table? In reply to
Hi, thanks for the reply. I know how to bring up the two tables using db and sdb and I know how to call the table using sdo. I think that my problem might be with my template for the second table. For some reason I cannot add a record to the second table. When I try I get: "

You can't add or change a record which is required by a related record in table "tblClients"."

What I think is happening is that the second template is not "talking" to the second table (if talking to any). I get unknown tags when I try and parse data to it. I am using <font class=boxhead><%ClientID%></font> to parse data and I am using <font
face=Tahoma,Arial,Helvetica size=2><input name=Date value="<%if Date%><%Date%><%endif%>"></font> to post data. On the master table's template, this works fine.

Do I need to specify which table to talk to in the second template? (I thought this was done with the link (db=*&sdb=*)).

When I use the default template, everything seems to work fine.

Please help.

Thanks.
Quote Reply
Re: [useruseruser] Add record to related table? In reply to
I'm not quite sure about the problems with your customized templates, but if you could send me those templates, I will have a look and might be able to help you.
TheStone.

B.

Last edited by:

TheStone: Jul 16, 2003, 1:09 PM
Quote Reply
Re: [TheStone] Add record to related table? In reply to
thanks, I'll send them right now