• Welcome, Guest. Please login.
 
October 21, 2019, 02:28:57 am

News:

Welcome to the SQLitening support forums!


Client does not disconnect if %SQL_LOCAL

Started by mikedoty, September 28, 2007, 06:09:01 pm

Previous topic - Next topic

mikedoty


  #INCLUDE "sql3client.inc"
  FUNCTION PBMAIN AS LONG
    LOCAL sSQL$,sDataBase$,errcode&,hSession&
    errcode = sql3_StartSession(hSession)
    sSQL = "SERVER = localhost; PORT = default; UID = PSS234; PASSWORD = sqlrocks"
    errcode = sql3_connect(hSession,sSQL)
    errcode = sql3_Use(hSession,"catalog.db3",%SQL3_LOCAL)   'this will not disconnect
    'errcode = sql3_Use(hSession,"catalog.db3",%SQL3_REMOTE) 'this will disconnect
    errcode = sql3_disconnect(hSession)
    sql3_EndSession(hSession)
  END FUNCTION

Paul Squires

Thanks Mike, nice detective work  ;)

I have made the fix and it will be in the next update.