JagGetCollectionList  JagGetInstanceData

Chapter 5: C Routines Reference

JagGetHostName

Description

Retrieve the client host name for the client connection that is associated with a C or C++ component instance.

Syntax

JagStatus JAG_PUBLIC JagGetHostName(
          SQLPOINTER hostName, 
          SQLINTEGER hostNameLen,
          SQLINTEGER *returnLen)

Parameters

hostName

The address of a character array to receive the client host name or, if the client software did not supply a host name, a zero-length string.

NoteJava clients and JagGetHostName Java clients do not supply the client host name (there is no mechanism to retrieve the host name in Java).

hostNameLen

The length, in bytes, of the hostName array. The length must include space for a null-terminator.

returnLen

NULL or the address of a SQLINTEGER variable.

returnLen is an optional output parameter that receives the length, in bytes, of the hostName value. The host name is null-terminated and the length includes the null-terminator.

Returns

Return value

To indicate

JAG_SUCCEED

Success

JAG_FAIL

Failure

JagGetHostName fails for the following reasons:

Check the server’s log file for more information when JagGetHostName fails.

See also

JagGetPeerAddress





Copyright © 2005. Sybase Inc. All rights reserved. JagGetInstanceData

View this book as PDF