[ic] Update userdb error message

Ed LaFrance interchange-users@interchange.redhat.com
Tue Feb 26 12:48:01 2002


At 05:15 PM 02/26/2002 +0000, you wrote:
>Hi IC'ers
>
>I am getting the following error when trying to update the userdb database 
>directly from within a html page using the inline perl example given in 
>the log_entry file and wondered if anyone had ever come across it before 
>or has any idea what could cause it.
>
>Safe: glob trapped by operation Mask at (eval 632) line 7
>
>The reason for doing this in line is that I am adding the new user to the 
>IC database for tracking orders after the Worldpay server has validated 
>the payment and returned my callback page, the code is actually in the 
>Callback page,  the transactions, orderline and inventory databases are 
>updating OK using [import] - it is just the Userdb.
>This halts the script and so the userdb does not get populated.  I have 
>made sure that all the variables and form fields referenced from the perl 
>script are accessible and OK
>
>The script from within the callback page is:

You probably need [flag type=write table=userdb] here.

- Ed L.



>Update userdb: [perl table=userdb]
>         my $id = $Values->{username} = $Values->{customer_id};
>         @always = qw/
>                                         company
>                                         fname
>                                         lname
>                                         address1
>                                         address2
>                                         city
>                                         state
>                                         zip
>                                         country
>                                         phone_day
>                                         mv_shipmode
>                                         mv_credit_card_type
>                                         mv_credit_card_exp_month
>                                         mv_credit_card_exp_year
>                                         email
>                                         phone_night
>                                         fax_order
>                                         email_copy
>                                         mail_list
>         /;
>         @sometimes = qw/
>                                                 password
>                                                 b_fname
>                                                 b_lname
>                                                 b_address1
>                                                 b_address2
>                                                 b_city
>                                                 b_state
>                                                 b_zip
>                                                 b_country
>                                                 b_phone
>                                                 fax
>                                                 credit_limit
>         /;
>
>         my $db = $Db{userdb};
>
>         if(! $db->record_exists($id)) {
>                 $db->set_row($id);
>                 $db->set_field($id, 'password', $Values->{password});
>         }
>
>         for(@always) {
>                 $db->set_field($id, $_, $Values->{$_});
>         }
>
>         for (@sometimes) {
>                 next unless $Values->{$_} =~ /\S/;
>                 $db->set_field($id, $_, $Values->{$_});
>         }
>
>         return "Updated customer record.";
>[/perl]
>
>Any Ideas anyone ?????
>
>Cheers
>
>Russ
>
>
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================