• Welcome to SQLitening Support Forum. Please login.
 
January 17, 2022, 09:39:10 PM

News:

Welcome to the SQLitening support forums!


slSetProcessMods "L0" after connect failure to return to LOCAL mode

Started by cj, March 26, 2014, 04:28:32 AM

Previous topic - Next topic

cj

If an attempt to connect fails the system is set to REMOTE mode and any attempt
to open a local database will fail unless slSetProcessMods "L0" is issued to return to LOCAL mode.

Error -18 TCP send/receive errors will be returned trying to work local if in remote mode and not connected.

#COMPILE EXE "\sql\bin\testconnect"
#INCLUDE "sqlitening.inc"

FUNCTION PBMAIN () AS LONG
  slSetProcessMods "E0"
  IF slConnect("bad address") THEN
    ? "Connected failed so change to local mode"
    slSetProcessMods "L0"
  ELSE
    ? "Connected"
  END IF
  IF slOpen("sample.db3") THEN
    ? "Database error " + slGetError
  ELSE
    ? "Database opened"
  END IF
  SLEEP 5000
END FUNCTION