Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Passing Newly Created Record ID to Page

New Here ,
Jul 15, 2007 Jul 15, 2007

Copy link to clipboard

Copied

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
TOPICS
Server side applications

Views

426
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 15, 2007 Jul 15, 2007

Copy link to clipboard

Copied

What language,
If PHP you could use
mysql_insert_id()

If asp try using
@@IDENTITY
search google for tutorials

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 16, 2007 Jul 16, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 16, 2007 Jul 16, 2007

Copy link to clipboard

Copied

Try this one it should be easy to follow:
http://www.kamath.com/tutorials/tut007_identity.asp

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 17, 2007 Jul 17, 2007

Copy link to clipboard

Copied

LATEST
@@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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines