Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Error 7019: Corrupt memo field (Error 5177: Trigger execution failed)

2 posts in Trigger Last posting was on 2010-05-03 10:02:48.0Z
"Saras Setiawan" Posted on 2010-05-03 08:59:04.0Z
From: "Saras Setiawan" <saras[at]epsylonhome[dot]com>
Newsgroups: Advantage.Trigger
Subject: Error 7019: Corrupt memo field (Error 5177: Trigger execution failed)
Date: Mon, 3 May 2010 15:59:04 +0700
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: 118.137.216.20
Message-ID: <4bde8fa1@solutions.advantagedatabase.com>
X-Trace: 3 May 2010 02:56:01 -0700, 118.137.216.20
Path: solutions.advantagedatabase.com!118.137.216.20
Xref: solutions.advantagedatabase.com Advantage.Trigger:453
Article PK: 1136515

Hi ALL,

Sometimes our client report us that they have error when execute our app.
tbTrans:
Error 5177: Trigger execution failed.
Error 7200: AQE Error: State = HY000; NativeError = 7019; ...
Error 7019: Corrupt memo field. **...

Can any body help me?


Sample script which raises error.
>>>>>>>>>>>
OPEN @tmpCURSOR AS SELECT CAST(n.KEYNO AS SQL_CHAR)+
IIF(TRIM(n.[FIELD1])='','',CHAR(13)+CHAR(10)+'FIELD1='+TRIM(n.[FIELD1]))+
IIF(TRIM(n.[FIELD2])='','',CHAR(13)+CHAR(10)+'FIELD2='+TRIM(n.[FIELD2]))+
IIF(n.[FIELDDATE] IS
NULL,'',CHAR(13)+CHAR(10)+'FIELDDATE='+CAST(n.[FIELDDATE] AS SQL_CHAR))+
IIF(TRIM(n.[FIELD3])='','',CHAR(13)+CHAR(10)+'FIELD3='+TRIM(n.[FIELD3]))+
IIF(TRIM(n.[FIELD4])='','',CHAR(13)+CHAR(10)+'FIELD4='+TRIM(n.[FIELD4]))+
IIF(TRIM(n.[FIELD5])='','',CHAR(13)+CHAR(10)+'FIELD5='+TRIM(n.[FIELD5]))+
IIF(n.[FIELDNUM1] IS
NULL,'',CHAR(13)+CHAR(10)+'FIELDNUM1='+CAST(n.[FIELDNUM1] AS SQL_CHAR))+
IIF(n.[FIELDNUM2] IS
NULL,'',CHAR(13)+CHAR(10)+'FIELDNUM2='+CAST(n.[FIELDNUM2] AS SQL_CHAR)) AS
OLDVALUE, '' AS NEWVALUE
FROM __NEW n;
TRY
FETCH @tmpCURSOR;
@oldValue = @tmpCURSOR.OLDVALUE;
@newValue = @tmpCURSOR.NEWVALUE;
FINALLY
CLOSE @tmpCURSOR;
END;

INSERT INTO MAUDIT ( ...
_OldValue,
_NewValue )
VALUES ( ...
@oldValue,
@newValue );

>>>>>>>>>>>
_OldValue and _NewValue is memo field.


"Saras Setiawan" Posted on 2010-05-03 10:02:48.0Z
From: "Saras Setiawan" <saras[at]epsylonhome[dot]com>
Newsgroups: Advantage.Trigger
References: <4bde8fa1@solutions.advantagedatabase.com>
Subject: Re: Error 7019: Corrupt memo field (Error 5177: Trigger execution failed)
Date: Mon, 3 May 2010 17:02:48 +0700
Lines: 59
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: 118.137.216.20
Message-ID: <4bde9e92@solutions.advantagedatabase.com>
X-Trace: 3 May 2010 03:59:46 -0700, 118.137.216.20
Path: solutions.advantagedatabase.com!118.137.216.20
Xref: solutions.advantagedatabase.com Advantage.Trigger:454
Article PK: 1136514

Found!
We must pack the audit table.

"Saras Setiawan" <saras[at]epsylonhome[dot]com> wrote in message
news:4bde8fa1@solutions.advantagedatabase.com...
> Hi ALL,
>
> Sometimes our client report us that they have error when execute our app.
> tbTrans:
> Error 5177: Trigger execution failed.
> Error 7200: AQE Error: State = HY000; NativeError = 7019; ...
> Error 7019: Corrupt memo field. **...
>
> Can any body help me?
>
>
> Sample script which raises error.
>>>>>>>>>>>>
> OPEN @tmpCURSOR AS SELECT CAST(n.KEYNO AS SQL_CHAR)+
>
> IIF(TRIM(n.[FIELD1])='','',CHAR(13)+CHAR(10)+'FIELD1='+TRIM(n.[FIELD1]))+
>
> IIF(TRIM(n.[FIELD2])='','',CHAR(13)+CHAR(10)+'FIELD2='+TRIM(n.[FIELD2]))+
> IIF(n.[FIELDDATE] IS
> NULL,'',CHAR(13)+CHAR(10)+'FIELDDATE='+CAST(n.[FIELDDATE] AS SQL_CHAR))+
>
> IIF(TRIM(n.[FIELD3])='','',CHAR(13)+CHAR(10)+'FIELD3='+TRIM(n.[FIELD3]))+
>
> IIF(TRIM(n.[FIELD4])='','',CHAR(13)+CHAR(10)+'FIELD4='+TRIM(n.[FIELD4]))+
>
> IIF(TRIM(n.[FIELD5])='','',CHAR(13)+CHAR(10)+'FIELD5='+TRIM(n.[FIELD5]))+
> IIF(n.[FIELDNUM1] IS
> NULL,'',CHAR(13)+CHAR(10)+'FIELDNUM1='+CAST(n.[FIELDNUM1] AS SQL_CHAR))+
> IIF(n.[FIELDNUM2] IS
> NULL,'',CHAR(13)+CHAR(10)+'FIELDNUM2='+CAST(n.[FIELDNUM2] AS SQL_CHAR)) AS
> OLDVALUE, '' AS NEWVALUE
> FROM __NEW n;
> TRY
> FETCH @tmpCURSOR;
> @oldValue = @tmpCURSOR.OLDVALUE;
> @newValue = @tmpCURSOR.NEWVALUE;
> FINALLY
> CLOSE @tmpCURSOR;
> END;
>
> INSERT INTO MAUDIT ( ...
> _OldValue,
> _NewValue )
> VALUES ( ...
> @oldValue,
> @newValue );
>
>>>>>>>>>>>>
> _OldValue and _NewValue is memo field.
>
>