Announcement

Collapse
No announcement yet.

SQL Tools closing a file it didn't open??

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Tools closing a file it didn't open??

    Here is an odd thing... I open a my_file on line 1 of my program. Then I call SQL Tools. All is well. Right before ending the program I call SQL_Shutdown. In the last few lines of my program I print to my my_file and then close it. Been having a strange Error 52 - Bad file name or number. Is it possible SQL Tools is closing my_file too??

    Normally the call to FREEFILE gives my_file 1 as the file number.

    I could just close SQL Tools last...

  • #2
    The SQL_Shutdown function does execute a PowerBASIC CLOSE statement (with no filenumber) as final step. It has no effect if you use the SQL Tools DLL, but if you use the SLL the CLOSE will affect your open files, too.
    "Not my circus, not my monkeys."

    Comment


    • #3
      OK! Thanks! Yes it is the SLL.
      What is a PowerBASIC CLOSE?

      Comment


      • #4
        SQL Tools is written in PowerBASIC, and the shutdown function includes a CLOSE statement. Because of the way SLLs work, it's just like having a CLOSE in your main source code.
        Last edited by Eric Pearson; 20 May 2017, 01:13 AM.
        "Not my circus, not my monkeys."

        Comment

        Working...
        X