If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > I can't insert and update in UDF

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-08-06, 06:40
ipsca ipsca is offline
Registered User
 
Join Date: May 2006
Posts: 2
I can't insert and update in UDF

Hello,

I am developing a udf in c.

When i try insert or update fields with udf in db2 i obtain this sqlcode "SQL CODE: -577"
This is the detail for sql code

SQLCODE -577, Error: ATTEMPTED TO MODIFY DATA WHEN THE DEFINITION OF THE FUNCTION OR PROCEDURE DID NOT SPECIFY THIS ACTION

I have tryied to modify the creation of UDF, i had added this tag "MODIFIES SQL DATA" but db2 print "sintax error"

This is the definition of this function

CREATE FUNCTION riz.VALIDA(in1 varchar(100) , in2 varchar(10))
RETURNS INTEGER
LANGUAGE c
PARAMETER STYLE sql
--MODIFIES SQL DATA --not works
FENCED THREADSAFE
NOT DETERMINISTIC
DISALLOW PARALLEL
NO EXTERNAL ACTION
EXTERNAL NAME 'ex!auth' ;

anyone can help me?

I think that the problem is the privilege

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On