BUG: Error Setting Sort to Char Field Greater than 255ID: Q189837
|
When you use an ADO recordset object, you cannot Sort on a field with more than 255 characters.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
Private Sub Form_Load()
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
rs1.Fields.Append "F1", adInteger
rs1.Fields.Append "F2", adChar, 255
rs1.Open
rs1.Sort = "F2" '<== This works
rs2.Fields.Append "F1", adInteger
rs2.Fields.Append "F2", adChar, 256
rs2.Open
rs2.Sort = "F2" '<== Error occurs here
End Sub
Run-time error '-2147217824 (80040e60)': The requested order could not be opened
Additional query words: kbvbp600 kbADO kbADO200
Keywords : kbADO200 kbDatabase kbVBp600
Version : WINDOWS:2.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 27, 1999