944,179 Members | Top Members by Rank

Ad:
Aug 7th, 2007
0

recordset::sort property

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
t_yalthis is offline Offline
22 posts
since Jul 2007
Aug 7th, 2007
0

Re: recordset::sort property

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Aug 7th, 2007
0

Re: recordset::sort property

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 but the mistake was at the while loop that I wrote.. which is not a problem right now anymore..

thanx a lot again..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
t_yalthis is offline Offline
22 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: about data report
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Write/ Read an object





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC