N
neverstill
Hi-
I have 2 tables
[prod_Main]
ProdId int
Name varchar
ImgId tinyint
[Prod_Imgs]
ImgId tinyint
ProdId tinyint
PathTn varchar
PathBig varchar
OK, when I want to INSERT a new record with a sproc, I have a bit of a
challenge here.
prod_Main needs to know Prod_Imgs.ImgId and ProdImg.ProdId needs to know
Prod_Main.ProdId
I have a dependency cycle. Am I facing:
INSERT Prod_Main and get the ideentity
INSERT int Prod_Imgs get the identity
UPDATE Prod_Main with the identity from Prod_Imgs
or is there some magical solution that I don't know about. I'm just
learning all this stuff, so I might be missing something base here
Thanks
-Steve
I have 2 tables
[prod_Main]
ProdId int
Name varchar
ImgId tinyint
[Prod_Imgs]
ImgId tinyint
ProdId tinyint
PathTn varchar
PathBig varchar
OK, when I want to INSERT a new record with a sproc, I have a bit of a
challenge here.
prod_Main needs to know Prod_Imgs.ImgId and ProdImg.ProdId needs to know
Prod_Main.ProdId
I have a dependency cycle. Am I facing:
INSERT Prod_Main and get the ideentity
INSERT int Prod_Imgs get the identity
UPDATE Prod_Main with the identity from Prod_Imgs
or is there some magical solution that I don't know about. I'm just
learning all this stuff, so I might be missing something base here
Thanks
-Steve