A
al
Hi,
I'm reading an xml file into a dataset and entering the data into an
SQL server express database.
I've got an employee table (empid as primary key) and an employee photo
table (empid as foreign key)
My xml file contains an employee element and multiple employee photo
elements.
I'm using auto increments and setting the seed and step to -1 in both
the database and in my code (Vb.net - i'm setting this using the drag
and drop dataset - as i said i'm a newbie and just getting trying to
get a quick solution)
if i have just one one photo element, it enters into my datagrid
(windows form) ok
as
photoid empid photofilename
-1 -1 emp1.jpg
i think the problem arises when i use multiple employeephoto elements
the photoid will increment okay but as its still the same employee
there will be a a constraint on the foreign key (at least this is
guess!!)
if anyone has any suggestions on how i could get around this, it would
be GREATLY APPRECIATED.
i've been looking at this for the past few days and getting
increasingly frustrated.
thanks in advance,
alan
I'm reading an xml file into a dataset and entering the data into an
SQL server express database.
I've got an employee table (empid as primary key) and an employee photo
table (empid as foreign key)
My xml file contains an employee element and multiple employee photo
elements.
I'm using auto increments and setting the seed and step to -1 in both
the database and in my code (Vb.net - i'm setting this using the drag
and drop dataset - as i said i'm a newbie and just getting trying to
get a quick solution)
if i have just one one photo element, it enters into my datagrid
(windows form) ok
as
photoid empid photofilename
-1 -1 emp1.jpg
i think the problem arises when i use multiple employeephoto elements
the photoid will increment okay but as its still the same employee
there will be a a constraint on the foreign key (at least this is
guess!!)
if anyone has any suggestions on how i could get around this, it would
be GREATLY APPRECIATED.
i've been looking at this for the past few days and getting
increasingly frustrated.
thanks in advance,
alan