varchar

DDL info: VARCHAR(n)

C++ info: UdxBase::UDX_VARIABLE

Note: You can specify VARCHAR(ANY) as an input type when creating a UDX. The function then accepts a character string of any length up to 32672 characters. The length of the parameter is determined by the length of the corresponding input argument. No truncation or blank padding is done for the input argument. If an argument is implicitly cast from a non-character string, the length is determined by following the same rules that the VARCHAR SQL function uses to determine the length attribute of the result.
struct StringArg
{
  char* data;
  int length;     // Bytes used by string data (not characters).
  int dec_length; // Character declared length.
};
struct StringReturn
{
  char* data;
  int size;
  // On enter it is the size (in bytes) allocated for string data.
  // On return it is the size (in bytes) actually used.
};