when i tried to use that property with Jet.OLEDB.4.0 Provider it said that the provider doesn't support that.
which provider supports it? and can i use that provider working with access DB?
thnks
when i tried to use that property with Jet.OLEDB.4.0 Provider it said that the provider doesn't support that.
which provider supports it? and can i use that provider working with access DB?
thnks
Come and get our ISDN CallerID http://www.3wm.biz
Sorting Records
Like the Filter property, the DAO and ADO Sort properties differ in that the DAO Sort method applies to subsequently opened Recordset objects, and for ADO it applies only to the current Recordset object.
The Microsoft Jet 4.0 OLE DB Provider doesn't support the IViewFilter or IViewSort OLE DB interfaces that ADO uses to filter and sort Recordset objects. For the Filter property, ADO will automatically call the client cur....
I think this implies that you should use ADO if you wish to use the sort method.
mendhak i m using ADO. but a code like bellow is not working saying that is a provider problem
VB Code:
cnn.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=access.mdb" cnn.open rs.CursorLocation=adUseClientset set rs=cnn.execute("Select * from Table1") rs.sort="field1"
Come and get our ISDN CallerID http://www.3wm.biz
By default the statement
Set Recordset = Connection.Execute
returns a Forward-Only cursor, which cannot be sorted.
Use the Recordset.Open method instead.
rs.Open "Select * from Table1", cnn, adOpenStatic, adLockReadOnly
You will then be able to sort the records.
FYI: The Connection.Execute statement creates a new recordset. The rs.CursorLocation = adUseClient statement before the Execute statement is useless.