I have a from that submits text and one image. I want to submit the text into one table, and the image name and foreign key into a different table. What I have does the first insert, the second insert doesn't happen, but I get no errors.
SQL 2000 database, coldfusion 5 server.
Thanks,
pt
putting the "new" in "newb".....
Code:
<cfquery name="addEditorial" datasource="#application.dsn#">
Declare @intFK int
INSERT INTO tblArticles(dtmEntered,dtPublication,strArticleTitle,txtArticle)
VALUES(#CreateODBCDateTime(Now())#,convert(datetime,'#Form.dtPublication#'),'#Form.strArticleTitle#','#Form.txtArticle#')
SET @intFK = Scope_Identity()
INSERT INTO tblImages(intArticleIDFK,strImageName,intSortOrder)
VALUES(@intFK,'#session.strImageName#',1)
</cfquery>
Thanks,
pt
putting the "new" in "newb".....