×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

SQL Select Question
2

SQL Select Question

SQL Select Question

(OP)
How do I close the table used in the Select statement. If I run the statement the first query runs but if I try to use the Select file for anything else I get message "File is in use".  How do I share this file so I can run multiple queriers.

thanks

Atlas

RE: SQL Select Question

By default the SELECT creates a cursor named QUERY and leaves it open in another work area. You could issue SELECT QUERY to get to it. I'm not sure about sharing the result table. You may want to try a VIEW instead. What is the purpose of the query? Would all users be running the query or is it something that only runs on init?

RE: SQL Select Question

Are you selecting into a cursor (the default) or into a table?  Selecting into a cursor (such as Query, the default) shouldn't be a problem, because VFP automatically overwrites it with subsequent results.  Selecting into a table could be a problem, though.

If the problem is that the SELECT can't open one of your source tables, that's a bit odd.

RE: SQL Select Question

It sounds like you may have the SET EXCLUSIVE setting set to ON.  With this setting on, any table may only be opened once. Try SET EXCLUSIVE OFF before running your query.

RE: SQL Select Question

Are you trying to use one of the table that you used in the FROM clause of your SELECT statement?  If thats the case, I think all table that you've specify in the FROM clause are automatically opened and will remain opened until you close them explicitly.  If if you want to access one of these table(s), instead if USE, simply SELECT the work area.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close