SQLSetVectorAsString
Full Description
swirl
Syntax
  define external function SQLSetVectorAsString
     (  read-only SQL_vector_type Vector,
        value stream StreamValue )


Purpose

Sets the data area of the SQL_vector_type variable to the specified stream value. The input stream must contain only text data, with no embedded nulls. The stream length is identified by the end of the stream or the first detected null byte.

Input arguments:

  • Vector. The SQL_vector_type variable to modify.
  • StreamValue. The specified stream value.

The following code demonstrates how to use SQLSetVectorAsString to set the string value of an SQL vector type:

  local SQL_Vector_type Vector
  local stream  VectorStringValue
  local counter StringSize

  SQLSetVectorSize( Vector, 40 )

  set VectorStringValue to SQLGetVectorAsString( Vector )
  set StringSize to (length of VectorStringValue)
  output "Initial string value  = %g(VectorStringValue)%n"
  output "Initial string length = %d(StringSize)%n"

  SQLSetVectorAsString( Vector, "visible%0#- after the null terminator" )
  set VectorStringValue to SQLGetVectorAsString( Vector )
  set StringSize to (length of VectorStringValue)
  output "Current string value  = %g(VectorStringValue)%n"
  output "Current string length = %d(StringSize)%n"

Copyright © OmniMark Technologies Corporation, 1988-1998.