Can't Sort dBaseIV file??

Can't Sort dBaseIV file??

Post by Michael Krame » Mon, 09 Dec 1996 04:00:00



Hi Fellow Programmers :-)

I am able to use a Bound data grid to display the information in a dBase
file.  When I try to sort the data using the code below, I get an error
message "Couldn't find Object SELECT Point, Margin FROM Bestlist ORDER
BY Point".  I don't think VB is able to fine the Bestlist.dbf file.  Can
anyone point me in the right direction on how I should code this to be
able to sort my data?

Thank You in advance from the desparate guy in Santa Barbara,CA,
Michael

'*  START BLOCK ***************************************************
Dim SQL As String
Data2.Connect = "dBASE IV;DATABASE=c:\vb\laser\Bestlist.dbf"

SQL$ = "SELECT POINT, MARGIN " _
    & " FROM Bestlist " _
    & " ORDER BY POINT;"
Data2.RecordSource = SQL$       ' Assign the RecordSource the new SQL

Data2.Refresh
'*  END BLOCK ***************************************************