Inability to change table data within Datamanager 1.9.20

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Inability to change table data within Datamanager 1.9.20

nigel-4
Benoit,

I've just noticed that data cannot be changed for the latest development version of the database manager. When comparing to the stable release 1.0.11 (which does work), I note that the function WriteData in FData.class is slightly different. When reapplying the differences, the change of data works;

e.g.

 WITH tbvData

    Connection.Handle.Begin

    $rData.MoveFirst

    FOR EACH $rData =========================> Remove this line!
    FOR iInd = 0 TO $rData.Count - 1 =================>Add This line

      IF $cDelete.Exist(iInd) THEN
        $rData.Delete
      ELSE IF $cData.Exist(iInd) THEN
        FOR EACH vVal IN $cData[iInd]
          sField = $cData[iInd].Key
          IF IsObject(Vval) THEN
            $rData[sField] = NULL
          ELSE
            $rData[sField] = vVal
          ENDIF
        NEXT
        $rData.Update
      ENDIF

      $rData.MoveNext ===========================> Add this line

    NEXT

regards

Nigel



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Inability to change table data within Datamanager 1.9.20

Benoît Minisini
On Tuesday 20 September 2005 20:33, [hidden email] wrote:

> Benoit,
>
> I've just noticed that data cannot be changed for the latest development
> version of the database manager. When comparing to the stable release
> 1.0.11 (which does work), I note that the function WriteData in FData.class
> is slightly different. When reapplying the differences, the change of data
> works;
>
> e.g.
>
>  WITH tbvData
>
>     Connection.Handle.Begin
>
>     $rData.MoveFirst
>
>     FOR EACH $rData =========================> Remove this line!
>     FOR iInd = 0 TO $rData.Count - 1 =================>Add This line
>
>       IF $cDelete.Exist(iInd) THEN
>         $rData.Delete
>       ELSE IF $cData.Exist(iInd) THEN
>         FOR EACH vVal IN $cData[iInd]
>           sField = $cData[iInd].Key
>           IF IsObject(Vval) THEN
>             $rData[sField] = NULL
>           ELSE
>             $rData[sField] = vVal
>           ENDIF
>         NEXT
>         $rData.Update
>       ENDIF
>
>       $rData.MoveNext ===========================> Add this line
>
>     NEXT
>
> regards
>
> Nigel
>

Thanks. I fix that...

--
Benoit Minisini



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gambas-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-devel
Loading...