hi everyone;

in my program I need to sort the recordset according to specific field, however it gives an error like "Run-time error 3251: Current provider does not support the neccessary interfaces for sorting or filtering"


rs_data.sort = "k_baslangic" 'is not working..

btw my connection code is

Set conn = New ADODB.Connection

With conn
.ConnectionString = "Provider = Microsoft.JET.OLEDB.4.0; data source = C:\Documents and Settings\kullaniciadi\Desktop\enson.mdb; persist security info = false"
.Open
End With

Set rs_data = New ADODB.Recordset
rs_data.ActiveConnection = conn
rs_data.Open "SELECT k_araba, k_baslangic, k_bitis FROM kira ORDER BY k_baslangic", conn, adOpenDynamic, adLockOptimistic

rs_data.CacheSize = 500


thanks

Recommended Answers

All 2 Replies

Hi,

U have already used "Order By" in ur RS_Data open statement, u need not sort it again..

Or else
if u want to sort it with "Sort" method, try Using this before opening the recset:

rs_data.CursorLocation = adUseClient

Regards
Veena

thanx veena...

I thought the sorting that I made in sql statement was not working at all, that's why I tried to sort again :S but the mistake was at the while loop that I wrote.. which is not a problem right now anymore..

thanx a lot again..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.