C
Chris
Hi, i have the following script which creates the two tables, i wish to have
a master/details form (with two datagrids on the same form, i have a many to
one relationship with tracks to album) but having i cant quite get it to
work. Please see the sql script below:
CREATE TABLE album(
id nvarchar(10) NOT NULL PRIMARY KEY,
title nvarchar(100),
artist nvarchar(100));
CREATE TABLE track(
album nvarchar(10),
dsk INTEGER,
posn INTEGER,
song nvarchar(255),
FOREIGN KEY (album) REFERENCES album(id));
All is well and i can add this as a new Datasource, i add both tables. In
the datasource explorer in VS2005 i click on album and it indeed shows the
track table as a sub table as shown below.
Album
|------ Id
|------ Title
|------ Artist
|------ Track (this is the table)
I then create a form and drag this dataset above but only the Album datagrid
is shown, how do i go about getting the Track sub-datagrid details on there
also? Can it be done automatically or do i need to add code?
Thanks in advance,
Chris
a master/details form (with two datagrids on the same form, i have a many to
one relationship with tracks to album) but having i cant quite get it to
work. Please see the sql script below:
CREATE TABLE album(
id nvarchar(10) NOT NULL PRIMARY KEY,
title nvarchar(100),
artist nvarchar(100));
CREATE TABLE track(
album nvarchar(10),
dsk INTEGER,
posn INTEGER,
song nvarchar(255),
FOREIGN KEY (album) REFERENCES album(id));
All is well and i can add this as a new Datasource, i add both tables. In
the datasource explorer in VS2005 i click on album and it indeed shows the
track table as a sub table as shown below.
Album
|------ Id
|------ Title
|------ Artist
|------ Track (this is the table)
I then create a form and drag this dataset above but only the Album datagrid
is shown, how do i go about getting the Track sub-datagrid details on there
also? Can it be done automatically or do i need to add code?
Thanks in advance,
Chris