PDA

Click to See Complete Forum and Search --> : Checbox within DataGrid (Oracle DB)


neilc
Jun 1st, 2000, 05:35 PM
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

Gary.Lowe
Jun 1st, 2000, 06:35 PM
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

neilc
Jun 1st, 2000, 10:36 PM
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

Gary.Lowe
Jun 1st, 2000, 11:02 PM
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