Hi, I'm trying to insert some text into one table, and an image name into a second table, with a foreign key of the first table. What I have goes through query analyzer with no errors, but never does the second insert. This is part of a web app and I've replaced the variables so it is easier to see what is happening.
Thanks in advance!
pt
putting the "new" in "newb".....
Code:
Declare @intFK int
INSERT INTO tblArticles(dtmEntered,dtPublication,strArticleTitle,txtArticle)
VALUES({ts '2005-08-15 12:00:00'},convert(datetime,'8/05/2005'),'Title here','text goes here')
SET @intFK = Scope_Identity()
INSERT INTO tblImages(intArticleIDFK,strImageName,intSortOrder)
VALUES(@intFK,'image.jpg',1)
Thanks in advance!
pt
putting the "new" in "newb".....