Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odbc and key searches in remote views on SQL
Message
De
12/12/2003 13:28:05
 
 
À
12/12/2003 13:19:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00858692
Message ID:
00858698
Vues:
13
>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 it
create sql view rvMyview remote connect myConn as ;
select * from mytable where mykey=?KeyValue

** use it later
KeyValue='1234'
Use rvMyView && or Requery("rvMyView") if already open
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform