> Le 8 sept. 2016 à 19:07, Guy Algot <[email protected]> a écrit :
> 
> [...]
> 
> So are you using the SQL LOGIN command?

yes:

++++++++++
  //xxxx_SQLconnect -> txt
  //$0 not empty => error
  //don't forget to LOGOUT if success
C_TEXT($0)
C_LONGINT(error_l)
C_TEXT($error_t)
  //_
$error_t:=""
$nmc_t:=Current method name
$currentErrorMethod_t:=Method called on error
If ($nmc_t=$currentErrorMethod_t)
        error_l:=error  //get 4d system var
Else
        
        $ip_t:="•••.•••.•••.•••"  //prod
        $nomUtilisateur_t:="SQL_MAJ"  //user as defined on target
        $motDePasse_t:="••••"  //password
        $source_t:="IP:"+$ip_t+":19812"  //address
        ON ERR CALL($nmc_t)  //auto call
        SQL LOGIN($source_t;$nomUtilisateur_t;$motDePasse_t;*)  //
        ON ERR CALL($currentErrorMethod_t)
        If ((ok#1) | (error_l#0))
                $0:=$nmc_t+" error SQL LOGIN could not connect to server "+$ip_t
                If (False)
                        SQL LOGOUT
                End if
        End if
End if
//_
++++++++++

-- 
Arnaud 



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to