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

Insert into database and get newly added info on next page?

LEGEND ,
May 05, 2006 May 05, 2006
I have a mail form that adds a few text boxes to a database and redirects to
a new page where the the person's name is displayed. How do I pull in the
users information from the row in the database that was just added?

I don't know why I can't get my head around this one... I swear I've done it
before...frustrating.



TOPICS
Server side applications
298
Translate
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 ,
May 07, 2006 May 07, 2006
If the site is low volume then you could use the @@identity function to grab
the newly created record, however a very simple technique is to grab the
contents of one of the fields that is likely to be unique, set the value
into a session variable and then use this to filter the records on the
display page.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"lee" <lfairban_nospam@amep.com> wrote in message
news:e3fmis$isa$1@forums.macromedia.com...
>I have a mail form that adds a few text boxes to a database and redirects
>to
> a new page where the the person's name is displayed. How do I pull in the
> users information from the row in the database that was just added?
>
> I don't know why I can't get my head around this one... I swear I've done
> it before...frustrating.
>
>
>


Translate
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 ,
May 09, 2006 May 09, 2006
Paul, could you be a bit more specific for me, I'm trying to perform a similar task. If you have two pages, and using Lee's example, how would you set this up? Thanks
Translate
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 ,
May 09, 2006 May 09, 2006
I have another thread open on the general Macromeda group but the theme of
it over there involves using store procedures and the @@identity thing.

I don't know if you're in the same situation but I am playing a LOT of catch
up right now and don't have time to learn some of these fundamentals in
order to do this.

Tom Muck has an extension that will do this but it uses aging technology.
It's only $15 and I'm thinking of getting it until I have the time to spend
learning this "new" stuff that has presented itself to me.

Once again we have to dump our knowledge base and re-tool.

Get so tired of that.

Anyways, let me know if you find out anything that you think will help.
Thanks


Translate
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 ,
May 09, 2006 May 09, 2006
LATEST
It depends upon which method that you intend to use but in terms of the
@@identity you create a recordset on the insert page (after the actual
insert and before the redirection that is something like this

Select @@identity as NewID from tablename

Then you would assign this to a session variable. On the second page you
simply grab the session variable and use it to filter the field.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"ferrarikid123" <webforumsuser@macromedia.com> wrote in message
news:e3ptgh$mi0$1@forums.macromedia.com...
> Paul, could you be a bit more specific for me, I'm trying to perform a
> similar task. If you have two pages, and using Lee's example, how would
> you set this up? Thanks


Translate
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