We are able to CONNECT TO location-name as long as it is hard
coded. Every time I have tried using a host-variable I keep
getting -950. Now I know the location name exists and I am
populating the :hv with a valid value.
The manual lists these requirements for CONNECT TO:
TO location-name or host-variableIdentifies
the server by the specified location name or by the location name
that is contained in the host variable. If a host variable is
- It must be a CHAR or VARCHAR variable with a length attribute
that is not greater than 16. (A C NUL-terminated character string
can be up to 17 bytes long.)
- It must not be followed by an indicator variable.
- The location name must be left-justified within the host
variable and must conform to the rules for forming an ordinary
- If the length of the location name is less than the length of
the host variable, it must be padded on the right with blanks.
- It must not contain lowercase characters.
- If used with an SQL procedure language application, host
variable must be a qualified SQL-variable name or a qualified
Has anyone successfully used a host variable for the location
name when CONNECTing from a Native Stored Procedure?
Stefan Kolev | Database Services