There is also an ODBCLOGIN. >From the docs: Routine name: ODBCLOGIN
Parameters: RTNVAL and USERNAME RTNVAL is an output parameter set by the routine; if it is set to 0, the connect fails; this allows the administrator to test for invalid connections and refuse them; any other value will allow the connection to succeed. USERNAME is an input parameter containing the connection username. Syntax: SUBROUTINE ODBCLOGIN(RTNVAL, USERNAME) UniServer will attempt to execute ODBCLOGIN during the verification stage of the connect processing, but after successful LOGTO to the target database. This way, if ODBCLOGIN is globally or locally cataloged, it will be successfully executed. If ODBCLOGIN is not cataloged, no errors are reported to the client and connection succeeds. The only time the connection is denied at this point is if ODBCLOGIN returns 0. ODBCCLOGIN subroutine is optional subroutine for UD ODBC or UniOLEDB connection. It must be a global cataloged subroutine. Here is the syntax for ODBCLOGIN. SUBROUTINE ODBCLOGIN(RTNVAL,USERNAME) 1. RTNVAL: If RTNVAL is a nonzero value, the connection is allowed. If it is zero, the connection is disallowed. 2. USERNAME: The user name that is being to establish the connection. Here is the subroutine sample for allowing "root" user to make an ODBC or UniOLEDB connection. SUBROUTINE ODBCCLOGIN(RTNVAL,USERNAME) IF USERNAME="root" THEN RTNVAL=1 END ELSE RTNVAL=0 END RETURN Hth Colin Alfke Calgary Canada >-----Original Message----- >From: Symeon Breen > >You can change the timeouts in the unirpcservices file. >However if your VB app is not coded to accept the >exception/error of a timedout connection object you may get >into trouble. > >unirpcservices is in /usr/unishared/unirpc on *nix - there is >documentation on what to change. > >Rgds >Symeon. > >On 05/03/07, Metherall, Arthur wrote: >> >> Hello, >> >> I'm running a VB read-only application that connects into UniData >> 6.0.8 on an IBM AIX 4.3.3, using ODBC. >> >> My problem is that we keep running out of user licenses on UniData. >> >> I have TIMEOUT set in the VOC-LOGIN, but that doesn't seem to effect >> the ODBC logins. >> >> Is there a way in UniData and/or Unix to set an ODBC >TIMEOUT, without >> having to mess with the VB source code? >> >> Thanks, >> >> Arthur E. Metherall >> Courier Corporation ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
