Results 1 to 5 of 5

Thread: CHECKBOXES do not show existing values

  1. #1
    Join Date
    Jul 2006
    Posts
    14

    Question CHECKBOXES do not show existing values

    I am using the enterprise version of Tornado.

    When I go to update mode the checkboxes do not reflect the existing values in the Oracle field that I have set up.

    I am using VARCHAR2(1) for the boolean field since Oracle does not have boolean.

    I have set:

    .dbBoolText="DropTrue=Y|DropFalse=N|Displaytrue=Y| Displayfalse=N"

    But it is still not showing the proper values.

    Am I doing something wrong or do I need to upgrade my version?

    Thanks

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    So you are tyring to use Y/N as VARCHAR2(1) to replace boolean. Did you use dbTrueVar to set t/f. The internal t/f test in tornado is ->

    t true yes ok = true
    f false no = false

    so, try to set t and f if you have only 1 char.

    I need to bring up my Oracle server to take a look also.

    Fk

  3. #3
    Join Date
    Oct 2002
    Posts
    933

    Oracle Boolean update

    OK.. finally get my Oracle 817 up and running. I am guessing that you want to use a one char field to do boolean in Oracle. Go to Scott/Tiger's EMP database and add a field at the end called BOOL of VARCHAR2(1). Use the following code to test the update.

    Frank

    ------------------------------------------------------

    Dim X As New Tornado.z
    X.dbQP = "U=1|S=1|M=Grid!sys=t|D=GDB817;scott;tiger|ni=b5,u pdate|Q=EMP| bm=EMP;0| Dt=Oracle| Pv=OracleClient"
    X.dbTextHolder = "Title=Oracle Update"
    X.dbCommonTables = "ind=t|value=Y,N"
    X.dbEditUpdateFlds = "fi=0|Ty=RONOUP,fi=bool|ty=selectbox|val=t"
    X.dbGridUpdateTemplate = "<h2>My Grid Update template</h2><P> [[GridUpdate]]<BR>[[GridNav]]"
    X.ASPdbNET()

  4. #4
    Join Date
    Oct 2002
    Posts
    933

    Oracle boolean

    Now, to use the checkbox to update the field like a boolean field is a bit tricky. We just have to stuff the field with true/false instead. Change the BOOL field to size of 5 instead of 1 and populate the values with "true" or "False" (no exception). Use the follwoing code to update the field and now the checkbox will sync with the true/false value.

    Frank




    Dim X As New Tornado.z
    X.dbQP = "U=1|S=1|M=Grid!sys=t|D=GDB817;scott;tiger|ni=b5,u pdate|Q=EMP| bm=EMP;0| Dt=Oracle| Pv=OracleClient"
    X.dbTextHolder = "Title=Oracle Update"
    X.dbCommonTables = "ind=t|value=true,false"
    X.dbEditUpdateFlds = "fi=0|Ty=RONOUP,fi=bool|ty=checkbox|val=t"
    X.dbGridUpdateTemplate = "<h2>My Grid Update template</h2><P> [[GridUpdate]]<BR>[[GridNav]]"
    X.ASPdbNET()

  5. #5
    Join Date
    Jul 2006
    Posts
    14

    Smile That Fixed it

    That worked.

    Thanks for your help.

    Mike Becker

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •