Home > Archive > FoxPro Help and Support > October 2005 > SQL Replacement for VFP 'SEEK()' Command









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL Replacement for VFP 'SEEK()' Command
Mike

2005-10-27, 8:34 am

I'm migrating an application from VFP to SQL. I'm trying to figure out how
to replace existing SEEK() commands with an SQL-equivelant command. So far I
haven't figured out how this can be done.

Within my application the SEEK() command is used to check if a value exists
in a DBF, and then further processing occurs depending if anything was found.
What is the best way to do this using SQL Server and stop using SEEK()?

Thanks.
Olaf Doschke

2005-10-27, 8:34 am

No chance to do row level seeks,
you have simply to use SELECT SQL and
select the records you'd find with seek in VFP.

Bye, Olaf.


Mike

2005-10-27, 8:34 am

Thanks for the clarification.

Mike

"Olaf Doschke" wrote:

> No chance to do row level seeks,
> you have simply to use SELECT SQL and
> select the records you'd find with seek in VFP.
>
> Bye, Olaf.
>
>
>

Mark McCasland

2005-10-27, 8:34 am

You can always do a SELECT COUNT(*) FROM MyTable instead of selecting some
field list to see if what you are looking for exists. This will save some
time since you are only returning 1 row/column.

"Mike" <Mike@discussions.microsoft.com> wrote in message
news:C1098007-B011-417D-8EAB- B72D92DCA658@microso
ft.com...
> I'm migrating an application from VFP to SQL. I'm trying to figure out

how
> to replace existing SEEK() commands with an SQL-equivelant command. So

far I
> haven't figured out how this can be done.
>
> Within my application the SEEK() command is used to check if a value

exists
> in a DBF, and then further processing occurs depending if anything was

found.
> What is the best way to do this using SQL Server and stop using SEEK()?
>
> Thanks.



Olaf Doschke

2005-10-27, 8:34 am

> You can always do a SELECT COUNT(*) FROM MyTable instead of selecting some
> field list to see if what you are looking for exists. This will save some
> time since you are only returning 1 row/column.

Yes, of course that saves time, if all you really need is the FOUND() or
SEEK() return value equivalent.

Bye, Olaf.


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com