Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle Data control and True DBGrid 5.0
We are using Oracle Objects for OLE Version 2.1.03.0 within Visual Basic
5.0 (SP3).
To display measured data a True DB Grid 5.0 control is used in
conjunction with the Oracle Data control. The grid control was
configured to fire the FetchCellStyle-Event for appearance formatting.
To increase performance of the FetchCellStyle procedure the use of a
clone to the ORADC recordset is recommended (as described in
TDBGrid-Handbook).
So we implemented the FetchCellStyle procedure as follows:
Private Sub TDBGrid1_FetchCellStyle(ByVal Condition As Integer, ByVal
Split As Integer, Bookmark As Variant, ByVal Col As Integer, ByVal
CellStyle As TrueDBGrid50.StyleDisp)
Dim Wert As Single
Dim CRec As Channel
Dim B As Boolean
Dim F As Object
On Error Resume Next
'#######################################################################
ORAClone.Bookmark = Bookmark --> this line of code fails !!!!!!!!!!!
'####################################################################### If Err.Number <> 0 Then Debug.Print Err.Description, CStr(ORAClone.Bookmark), CStr(Bookmark) Exit Sub
Set F = ORAClone.Fields(Col)
If IsNull(F) Then Exit Sub
Wert = CSng(F)
CRec = UserData(Me.Tag).Chn(Col - 2)
With CRec
B = False If .VMin < .VMax Then If Wert < .VMin Or Wert > .VMax Then B = True Else If Wert > .VMin Or Wert < .VMax Then B = True End If
CellStyle.ForeColor = vbRed CellStyle.Font.Bold = True
The opening of the recordset, the generation of the clone and the binding of TDBGrid to the data control is done in the form load event:
..... .ORADC1.RecordSource = SQL .ORADC1.Refresh Set ORAClone = .ORADC1.Recordset.Clone .TDBGrid1.Datasource = ORADC1 .TDBGrid1.ClearFields ......
When running the program we always get the error message OIP-04121: Invalid bookmark
Does anyone know what's wrong?
Response with EMail is prefered!
Thanx in advance
Martin
![]() |
![]() |