Results 1 to 3 of 3

Thread: SQL and open text files

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    hi!
    I've got two questions. First of all, how can I set the SQL code to a table's query during run-time? I tried using recordset but that didn't work.

    Also, I am using text files to store retrieve some simple data. Sometimes when I wish to open a file, I get an error message saying that the file's already open. But when I look through my code, there's no Open command without a Close command. Any help?

    ------------------
    Regards,
    Alexander McAndrew
    VB Zone
    http://gsenterprise.server101.com


  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    Are you using a different Number for each open command i.e.

    Open CommonDialog1.FileName for Input As #1
    'Code Here
    Close #1

    And

    Open CommonDialog1.FileName for Input As #2
    'Code Here
    Close #2

    I'm not sure this is right but it is worth a try. I had the same problem once but I'm not quite sure how I solved it? - Sorry



  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    thanks, I'll give that a try. Maybe I forgot to change the numbers. Any ideas for the toher question?

    ------------------
    Regards,
    Alexander McAndrew
    VB Zone
    http://gsenterprise.server101.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width