Click to See Complete Forum and Search --> : sort property in vb recordset


erez_zi
October 15th, 2001, 07:09 AM
Hi,

I'm trying to create a recordset and use the sort proerty, but it fails when opening the recordset for an unspecified error. Here's the code:


private Sub Form_Load()
Dim rst as new ADODB.Recordset

With rst
.Fields.Append "fld1", adBSTR
.Fields.Append "fld2", adInteger
.Sort = "fld1"
.Open
End With
End Sub



WHY ??????

Iouri
October 15th, 2001, 07:42 AM
I think that you cannot append(or sort) to the recordset that is not opened yet

Iouri Boutchkine
iouri@hotsheet.com

erez_zi
October 15th, 2001, 07:57 AM
even when opening the recordset and then do the sort, it fails.