Results 1 to 4 of 4

Thread: Checbox within DataGrid (Oracle DB)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    2

    Unhappy

    Hi

    I have bound a datagrid to an ADO recordset at runtime. The database I am using is Oracle 7.3 and I'm using the MSDAORA OLE DB provider. I am trying to display a check box in one of the columns however this doesn't seem to work because their is no BOOLEAN datatype in Oracle. The database field I am binding this column to is a NUMBER(1) populated with either 0 or -1. When I run my app no checkbox is displayed just the number 0 or 1. The strange thing is if I format this column from the Format tab on the Datagrid Property Page as Boolean rather than Checkbox it correctly displays "True" or "False"!!!

    Has anyone got any suggestions????

    Thanks

    Neil

  2. #2
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621

    Cool

    Neil

    I don't know if this will help.

    I have created a form with textbox and check box forms and bound these to the information in the recordset.


    Save this as an active x control.

    Now on the form you have the datagrid replace it with the VB6 data repeater control and reference the active x control you created earlier.

    This also allows use to customise the view the data is presented in and looks a lot better.

    The documentatino for this can be found on the MSDN 'Whats new in VB6 controls under the data repeater section.

    Hope this is of use.

    Gary

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    2
    Gary

    Thanks for your response.

    I have now implemented the datarepeater control but I am having problems updating the database. I have seen the known bug in the Microsoft KB and have used their work around but I only seem to be able to update one record at a time.

    Do you have example code that allows the datarepeater to update the database?

    Thanks

    Neil

  4. #4
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621

    Cool

    Neil

    I have only used the data repeater to enable the user to update a specific record at a time

    i.e.

    An invisible textbox containing the record ID is used on the active x control.

    An update button on the active x control then searches for the id in the text box on that paticular record and updates it accordingly.

    I have never tried it ediditing multiple records

    Don't know if this gives you any ideas

    Gary

Posting Permissions

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



Click Here to Expand Forum to Full Width