This topic is locked

Primary Key Question

3/10/2005 11:40:19 AM
ASPRunnerPro General questions
E
Ewanm author

I have a table which I want to create a one to many relationship with. The field I will use in my Master table is not the tables Primary Key in the database. Is this possible.
I am using MS SQL

Sergey Kornilov admin 3/11/2005

Sure, you can use any fields to define master-details relatrionship. Your choice is not limited by primary/foreign key fields.

500213 3/11/2005

Thanks for the reply.
I have setup two tables in SQL with a primary key in the master table (int) and a foreign key in the detail (int). When I generate the code as instructed in the help manual. The fields which should be shown on the master page are blank. The record is there if I click the edit icon, I can see the record. Also there is no link to the Details table.
Can you advise.

Sergey Kornilov admin 3/12/2005

You need to make suru no errors happen on the Master page. To see error messages if any open ..._list.asp file in any text editor

and change the following line:

On Error Resume Next


to

'On Error Resume Next


After that you can run this page again and see error message which you can post here.