Hi Muthu,

;-) Yes, now this workaround seems to work. The buggreports from mysql
are quite old, guess that there is a need to change the adodb layer. 

Robert


Am Mittwoch, den 29.09.2010, 05:20 +0530 schrieb Ap.Muthu:
> Hi Robert,
> 
> Thanks for keeping me awake....
> 
> Re-jigged the fix at SVN 6825 and tested that it works
> Reverted SVN 6824 and replaced the following at line 318
>     $oid = $db->Insert_ID();
> with
>     $oid = ( (isset($pid) && ($pid > 0) ) ? $db->Insert_ID() : 
> $_POST['pid'] );
> 
> Regards,
> Ap.Muthu
> 
> 
> > Sorry, insert at Line 302.
> >
> > Committed SVN 6824.
> >
> >
> >> Inserting:
> >>       $_SESSION['sess_pid'] = $_POST['pid'];
> >>
> >> at line 308 does the job!
> >>
> >>
> >>> File: class_gui_input_person.php
> >>> Line 308
> >>> $_POST variable contents:
> >>> Array
> >>> (
> >>>    [date_reg] => 2010-09-29 06:44:02
> >>>    [title] => Mr.
> >>> ...    [create_time] => 20100929064402
> >>>    [pid] => 10000000
> >>> )
> >>>
> >>> This shows that the variable %_POST['pid'] gets populated correctly but
> >>> the
> >>> variable $pid still remains 0 and $pid is used in subsequent
> >>> operations.....
> >>>
> >>>
> >>>
> >>>> Hi Robert,
> >>>>
> >>>> You are right. At the time of first correct data insertion, pid will 
> >>>> get
> >>>> it'svalue from the config table parameter  value of 10000000.
> >>>> Hence we must investigate the code just after the insert.
> >>>> It has to be in class_gui_input_person.php.
> >>>>
> >>>> Also note the commenting out of the $_SESSION variable in
> >>>> /include/core/inc_vars_resolve.php
> >>>>
> >>>> Regards,
> >>>> Ap.Muthu
> >>>> apmu...@usa.net
> >>>>
> >>>>
> >>>>> Hi
> >>>>>
> >>>>> Am Mittwoch, den 29.09.2010, 03:23 +0530 schrieb Ap.Muthu:
> >>>>>> Just before line 42,
> >>>>>> $_SESSION['pid'] = 0
> >>>>>> $_POST is blank
> >>>>>> $_REQUEST[' pid'] = 0
> >>>>>
> >>>>> That's ok, no problem. But maybe I found the issue, but not the
> >>>>> solution.
> >>>>>
> >>>>> class_gui_input_person.php, after line 311 the section start where a
> >>>>> new
> >>>>> patient will be inserted to the database:
> >>>>>
> >>>>>
> >>>>> <------------>
> >>>>> if(!$error_person_exists||$mode=='forcesave'){
> >>>>> if($person_obj->insertDataFromInternalArray()){
> >>>>> <------------>
> >>>>>
> >>>>> This part is ok (checked). The record will be created, all values as
> >>>>> far
> >>>>> I could see are there. Perfect.
> >>>>>
> >>>>> The source of this bug must be somewhere here:
> >>>>> <------------>
> >>>>> if(!$update){
> >>>>> $oid = $db->Insert_ID();
> >>>>> $pid=$person_obj->LastInsertPK('pid',$oid);
> >>>>> //EL: set the new pid
> >>>>> $person_obj->setPID($pid);
> >>>>> }
> >>>>> <------------>
> >>>>> In fact: If you have an empty care_person, $db->Insert_ID() will 
> >>>>> return
> >>>>> zero -> pid will be set to 0.
> >>>>>
> >>>>> But the record is there. So after the 2nd call of this part of the
> >>>>> script (another patient will be registered), the Insert_ID() adodb
> >>>>> function returns the correct value.
> >>>>>
> >>>>> That seems for me the real source of all these kind of bugs (even the
> >>>>> pic, because the filename of the patient picture is given by its pid,
> >>>>> when it is 0 then it will be called 0.jpg etc.)
> >>>>>
> >>>>> So either it is here an real adodb issue (why does it not happen
> >>>>> before?) or the table creation had been changed.
> >>>>>
> >>>>> Any idea?
> >>>>> Robert
> >>>>>
> >>>>>
> >>>>>>
> >>>>>>
> >>>>>> > Line 42 in
> >>>>>> > /modules/registration_admmission/patient_register_show.php
> >>>>>> > is:
> >>>>>> > $person = & new GuiPersonShow;
> >>>>>> > Should we do away with the "&"?
> >>>>>> > Does it make a difference?
> >>>>>> >
> >>>>>> >
> >>>>>> >> Hi Muthu,
> >>>>>> >>
> >>>>>> >> Yes, I know. It has not closed that issue. This is a really heavy
> >>>>>> >> bug...
> >>>>>> >> It happen always to the very first pid. Then it seems to be ok..
> >>>>>> >>
> >>>>>> >> Wow.. now going through all the files and see where the pid will 
> >>>>>> >> be
> >>>>>> >> transported by 0 records of care_person.
> >>>>>> >> Well, the entry will be done in care_person correctly before the
> >>>>>> >> message
> >>>>>> >> will be shown up. So it is an session issue somewhere.
> >>>>>> >>
> >>>>>> >> Robert
> >>>>>> >
> >>>>>> >
> >>>>>> >
> >>>>>> > ------------------------------------------------------------------------------
> >>>>>> > Start uncovering the many advantages of virtual appliances
> >>>>>> > and start using them to simplify application deployment and
> >>>>>> > accelerate your shift to cloud computing.
> >>>>>> > http://p.sf.net/sfu/novell-sfdev2dev
> >>>>>> > _______________________________________________
> >>>>>> > Care2002-developers mailing list
> >>>>>> > Care2002-developers@lists.sourceforge.net
> >>>>>> > https://lists.sourceforge.net/lists/listinfo/care2002-developers
> >>>>>> >
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> ------------------------------------------------------------------------------
> >>>>>> Start uncovering the many advantages of virtual appliances
> >>>>>> and start using them to simplify application deployment and
> >>>>>> accelerate your shift to cloud computing.
> >>>>>> http://p.sf.net/sfu/novell-sfdev2dev
> >>>>>> _______________________________________________
> >>>>>> Care2002-developers mailing list
> >>>>>> Care2002-developers@lists.sourceforge.net
> >>>>>> https://lists.sourceforge.net/lists/listinfo/care2002-developers
> >>>>>
> >>>>> -- 
> >>>>> --
> >>>>> --------------------------------------------
> >>>>> CARE2X - free Integ Hospital Info System
> >>>>> https://sourceforge.net/projects/care2002/
> >>>>> http://www.care2x.org
> >>>>>
> >>>>>
> >>>>> ------------------------------------------------------------------------------
> >>>>> Start uncovering the many advantages of virtual appliances
> >>>>> and start using them to simplify application deployment and
> >>>>> accelerate your shift to cloud computing.
> >>>>> http://p.sf.net/sfu/novell-sfdev2dev
> >>>>> _______________________________________________
> >>>>> Care2002-developers mailing list
> >>>>> Care2002-developers@lists.sourceforge.net
> >>>>> https://lists.sourceforge.net/lists/listinfo/care2002-developers
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> ------------------------------------------------------------------------------
> >>>> Start uncovering the many advantages of virtual appliances
> >>>> and start using them to simplify application deployment and
> >>>> accelerate your shift to cloud computing.
> >>>> http://p.sf.net/sfu/novell-sfdev2dev
> >>>> _______________________________________________
> >>>> Care2002-developers mailing list
> >>>> Care2002-developers@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/care2002-developers
> >>>>
> >>>
> >>>
> >>>
> >>> ------------------------------------------------------------------------------
> >>> Start uncovering the many advantages of virtual appliances
> >>> and start using them to simplify application deployment and
> >>> accelerate your shift to cloud computing.
> >>> http://p.sf.net/sfu/novell-sfdev2dev
> >>> _______________________________________________
> >>> Care2002-developers mailing list
> >>> Care2002-developers@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/care2002-developers
> >>>
> >>
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Start uncovering the many advantages of virtual appliances
> >> and start using them to simplify application deployment and
> >> accelerate your shift to cloud computing.
> >> http://p.sf.net/sfu/novell-sfdev2dev
> >> _______________________________________________
> >> Care2002-developers mailing list
> >> Care2002-developers@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/care2002-developers
> >>
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Start uncovering the many advantages of virtual appliances
> > and start using them to simplify application deployment and
> > accelerate your shift to cloud computing.
> > http://p.sf.net/sfu/novell-sfdev2dev
> > _______________________________________________
> > Care2002-developers mailing list
> > Care2002-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/care2002-developers
> > 
> 
> 
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Care2002-developers mailing list
> Care2002-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/care2002-developers

-- 
--
--------------------------------------------
CARE2X - free Integ Hospital Info System
https://sourceforge.net/projects/care2002/
http://www.care2x.org


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to