Skip to main content
Participant
July 15, 2007
Question

Passing Newly Created Record ID to Page

  • July 15, 2007
  • 3 replies
  • 500 views
Hi All,

i was hoping someone could help me. I'm using DW 8, with SQL 2000 and dw standard insert record behavior.

What i need is the id of the new created record to be passed to the next page, but I haven't been able to find out how to do this. I know i need to insert a session variable somewhere into the insert code but I'm not sure where to do this

I've searched the tutorials and googled this but can't find an answer that helps and am now on the verge of pulling my hair out.

Can anyone help me?

Thanks

Tom
This topic has been closed for replies.

3 replies

Inspiring
July 17, 2007
@@IDENTITY is Transact-SQL which is the querying language for SQL Server and
not ASP. This will only work if you are using SQL Server for your database.
Anyway, you do not want to use @@IDENTITY. SCOPE_IDINTITY() is much more
reliable but is also SQL Server only.


"MikeL7" <webforumsuser@macromedia.com> wrote in message
news:f7g72m$48l$1@forums.macromedia.com...
> Try this one it should be easy to follow:
> http://www.kamath.com/tutorials/tut007_identity.asp


Inspiring
July 16, 2007
Try this one it should be easy to follow:
http://www.kamath.com/tutorials/tut007_identity.asp
Inspiring
July 16, 2007
What language,
If PHP you could use
mysql_insert_id()

If asp try using
@@IDENTITY
search google for tutorials
allsortsAuthor
Participant
July 16, 2007
I'm doing the page in ASP.

I had found that information before on google about @@identity, but I can't find information about where it should go. If you could point me i the right direction for where to place it in the insert behaviour that would be great.

Thanks

Tom