Kbase P167598: How to update MS SQL Server text field to overcome 32k limit?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  09/06/2010 |
|
Status: Unverified
GOAL:
How to update MS SQL Server text field to overcome 32k limit?
GOAL:
How to update MS SQL Server text field to accomodate data more than 32k?
GOAL:
How to use SEND-SQL-STATEMENT to update MS SQL Server text field?
FACT(s) (Environment):
Windows
OpenEdge 10.1x
OpenEdge 10.2x
MS SQL DataServer
FIX:
The following example demonstrates how you can create a SQL using ABL construct to pass longchar variable to send large amount of data to append on the existing records on the MS SQl server text field:
DEFINE VARIABLE h1 AS INTEGER.
DEFINE VARIABLE clong as LONGCHAR NO-UNDO.
DEFINE VARIABLE cVar AS LONGCHAR NO-UNDO.
ASSIGN
cLong = 'abc'
cVar = 'Declare @ptr binary(16);'
+ 'Declare @i int;'
+ "SELECT @ptr = TEXTPTR(state.textFld) FROM state WHERE state.state = 'MA';"
+ 'UPDATETEXT state.textFld @ptr @i 0 '
+ CHR(39)
+ clong
+ CHR(39)
.
RUN STORED-PROC send-sql-statement h1 = PROC-HANDLE(cVar).
CLOSE STORED-PROC SEND-SQL-STATEMENT WHERE PROC-HANDLE = h1.