[ic] Re: record created, but cant retrieve autonumber value on next page

Aaron Hazelton interchange-users@icdevgroup.org
Fri Aug 23 14:26:01 2002


 racke@linuxia.de wrote:
> 
> Aaron Hazelton writes: 
> 
> [..] 
> 
> >
> > I really don't know much about perl, I just knew enough to copy
> > it from the admin UI page that allows creation of a new db record
> > from a form.  I copied the code exactly and just changed the table
> > name in the code. 
> > 
> > This is my first attempt at a totally user-manipulatable db 
> from html
> > forms and using the autonumber feature... so im kind of confused.
> 
> Sounds very insecure :-( 

I didn't say because I thought it was not relevent, but this is on a
local
"Intranet" server and is totally blocked from the internet and is for
cust.
service reps to quickly operate the "quote" table without being logged
in.
so security is not an issue.

> 
> You can try set_slice, which works automagically on AUTO_SEQUENCE
> databases. 
> 
> [perl tables=havoc]
> $Scratch->{new_id} = $Db{havoc}->set_slice('', ['field1', 'field2'], 
> [$CGI->{field1},$CGI->{field2}]);
> return;
> [/perl] 
> 
> New id is [scratch new_id] 
> 

well, using this enters the record with the autonumber like before with
no 
problems, but I still do not get any value for the quote number on the 
next page, even using the [scratch new_id]  ??

could it be anything to do with the fact that the form needs to have
mv_todo - set instead of mv_doit - return so that the table will be 
updated?

thanks again to everybody...

> Ciao
>      Racke
> > 
> > any other ideas?
> > thanks! 
> > 
> >> 
> >> -- 
> >>    _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
> >>   _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   
> >> W a l s h
> >>  _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
> >> _/   _/  _/_/_/_/      _/    _/_/_/  _/    _/ 
> >> 
> >   _____   
> > 
> > Sincerely,
> > Aaron Hazelton
> >>>Hazenet<<
> > aaron@hazenet.net 
> > 
> > 

AARON