ODBCResultSet has a new property as documented below:
TrimTrailingSpaces property
Read-write. Indicates whether trailing spaces are trimmed from character values upon retrieval. Can be set to "False" to prevent trimming.
NOTE: This property is new with Release 5.0.5.
Defined in
ODBCResultSet
Data type
Boolean
Syntax
To get: flag% = odbcResultSet.TrimTrailingSpaces
To set: odbcResultSet.TrimTrailingSpaces = flag%
Legal values
True (default) - indicates that trailing spaces are trimmed
False - indicates that trailing spaces are not trimmed
Usage
This property, when set, affects subsequent Execute and ExecProcedure methods.
Example: TrimTrailingSpaces property
This agent looks at the 16-character DESCRIP column in a database and replaces those rows that have all spaces with the phrase "The Description.":
Sub Initialize
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Set qry.Connection = con
Set result.Query = qry
con.ConnectTo("ATDB")
REM WHERE clause contains 16 spaces
qry.SQL = "SELECT * FROM STUDENTS WHERE DESCRIP = ' '"
result.TrimTrailingSpaces = False
result.Execute
result.LastRow
For i = 1 To result.NumRows
result.CurrentRow = i
Call result.SetValue("DESCRIP", "The Description.")
result.UpdateRow
Next
result.Close(DB_CLOSE)
con.Disconnect
End Sub