almike
October 17th, 2001, 09:42 AM
I have a disconnected recordset that I use as a data store so that I can use the filter and sort properties. It worked great in VB6 MDAC2.5 on Win98.
We are now porting to Win2K, VB6, MDAC2.6 and I get an unspecified error on the recordset when I try to do an addnew, some other method or even just setting one of the fields. It works great for a while but as the recordset grows, eventually I get 'Unspecified Error' failure. The error does not consistantly happen at the same place everytime, and appears to occur as the recordset grows. This makes me suspect some kind of memory leak or something. Any Ideas? The following is how I create the recordset.
Private Sub createRS as recordset()
Dim rs As New Recordset
'create the recordset
With rs
.Fields.Append "A", adChar, 4
.Fields.Append "B", adChar, 1200
.Fields.Append "C", adChar, 2000
.Fields.Append "C", adChar, 12
.Fields.Append "E", adChar, 50
.Fields.Append "F", adChar, 4
.Fields.Append "G", adChar, 8
.Fields.Append "H", adChar, 8, adFldIsNullable
.Fields.Append "I", adChar, 8
.Fields.Append "J", adInteger
.Fields.Append "K", adInteger
.Fields.Append "L", adChar, 10
.Fields.Append "M", adChar, 40
.Fields.Append "N", adChar, 24
.Fields.Append "O", adChar, 4
.Fields.Append "P", adChar, 4
.Fields.Append "Q", adChar, 4
.Fields.Append "R", adInteger
.Fields.Append "S", adInteger
.Fields.Append "T", adBoolean
.Fields.Append "U", adBoolean
.Fields.Append "V", adBoolean
.Fields.Append "W", adChar, 10, adFldIsNullable
.Fields.Append "X", adChar, 10, adFldIsNullable
.Fields.Append "Y", adInteger
.Fields.Append "X", adBoolean
.Fields.Append "Z", adBoolean
.CursorLocation = adUseClient
.Open
End With
Set createRS = rs
Thanks for any insight.
PSH
We are now porting to Win2K, VB6, MDAC2.6 and I get an unspecified error on the recordset when I try to do an addnew, some other method or even just setting one of the fields. It works great for a while but as the recordset grows, eventually I get 'Unspecified Error' failure. The error does not consistantly happen at the same place everytime, and appears to occur as the recordset grows. This makes me suspect some kind of memory leak or something. Any Ideas? The following is how I create the recordset.
Private Sub createRS as recordset()
Dim rs As New Recordset
'create the recordset
With rs
.Fields.Append "A", adChar, 4
.Fields.Append "B", adChar, 1200
.Fields.Append "C", adChar, 2000
.Fields.Append "C", adChar, 12
.Fields.Append "E", adChar, 50
.Fields.Append "F", adChar, 4
.Fields.Append "G", adChar, 8
.Fields.Append "H", adChar, 8, adFldIsNullable
.Fields.Append "I", adChar, 8
.Fields.Append "J", adInteger
.Fields.Append "K", adInteger
.Fields.Append "L", adChar, 10
.Fields.Append "M", adChar, 40
.Fields.Append "N", adChar, 24
.Fields.Append "O", adChar, 4
.Fields.Append "P", adChar, 4
.Fields.Append "Q", adChar, 4
.Fields.Append "R", adInteger
.Fields.Append "S", adInteger
.Fields.Append "T", adBoolean
.Fields.Append "U", adBoolean
.Fields.Append "V", adBoolean
.Fields.Append "W", adChar, 10, adFldIsNullable
.Fields.Append "X", adChar, 10, adFldIsNullable
.Fields.Append "Y", adInteger
.Fields.Append "X", adBoolean
.Fields.Append "Z", adBoolean
.CursorLocation = adUseClient
.Open
End With
Set createRS = rs
Thanks for any insight.
PSH