| Author |
SQL Replacement for VFP 'SEEK()' Command
|
|
|
| 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.
| |
|
| 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.
|
|
|
|