>Hi All,
>
>I have a primary key setup on a remote view from an ODBC connection. Im trying to use some sort of lookup that is fast like seek() is on VFP tables.
>
>Currently, Im using the e.g (LOCATE FOR mykey = '1234 '; OR LOCATE FOR '1234 ' $ mykey), but not sure if this is the best way or most efficient way to do this on a remote view.
>
>Am I on the right track, or is there a better way to access a specific record on a remote view.
>
>Thanks in advance, I appreciate any input on this.
>
>Craig
couple of ways otoh:
[preferred] Your view, or a similar view, could be defined to filter on this key value to begin with, e.g.
create sql view rvMyview remote connect myConn as ;
select * from mytable where mykey=?KeyValue
KeyValue='1234'
Use rvMyView
or you can create an index on the column in the view - this must be done everytime the view is open, though, since the index is dropped the view is closed. e.g.
Use rvMyView
Index On mykey Tag mykey
hth
Trey
Insanity: Doing the same thing over and over and expecting different results.