Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Jan 2007 @ 15:30:21 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Problem setting the error_message in UDF
 
From:   Patel,Harshida

Is it possible in UDF to assign input value to errormessage. I am not that experienced with C. But, I want to use the inputStr value as the errormessage. Can you please help me with this?

     #define SQL_TEXT Latin_Text
     #include "sqltypes_td.h"
     #define SomeConstantError "Failed Test"

     #include 
     #include 
     // **************************************************************

     void unitTestFailedMessage( char *inputStr[256],
                     int *result,
                     int *inputStringISNull,
                     int  *resultISNull

                   , char sqlState[6]
                   , SQL_TEXT extName[129]
                   , SQL_TEXT specificName[129]
                   , SQL_TEXT errorMessage[257]
      )
     {

        // strcpy((char *) errorMessage, "Null value not allowed");
          strcpy((char *) errorMessage, inputStr);
         strcpy(sqlState,  "22004");

          return;
     }

Thanks,

Harshida



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023