Does anyone have an insight on this? This executes and returns an error:
"The system has attempted to use an undefined value, which usually indicates a
programming error, either in your code or some system code.
Null Pointers are another name for undefined values. "
Stored Procedures is written in Oracle
*******************************************************************
<cfset Variables.ReceiptKey = "100">
<cfstoredproc procedure="sp_getSequence"
datasource="ims"
returncode="yes"
debug="yes">
<cfprocparam cfsqltype="cf_sql_varchar" type="in" value="TWN01">
<cfprocparam cfsqltype="cf_sql_varchar" type="in" value="RECEIPT">
<cfprocparam cfsqltype="cf_sql_varchar" type="out" variable="Variables.ReceiptKey">
</cfstoredproc>
<CFOUTPUT>
SEQUENCE NO : #ReceiptKey#
</CFOUTPUT>
*******************
stored procedure:
***********
Create or Replace procedure sp_getSequence( pWarehouse_Id in varchar2,
pTableName in varchar2,
pSeqNo out varchar2) is
-- Author : Ramesh Jayapal
mrecSeq IMSSequence%ROWTYPE;
mSeqNo varchar2(80);
Begin
Select * into mrecSeq
from IMSSequence
Where Warehouse_Id = pWarehouse_id
and TableName = pTableName;
mSeqNo := to_Char(mrecSeq.SeqNo);
If mrecSeq.PadChar is not NULL Then
mSeqNo := LPad(mSeqNo, mrecSeq.PadLen, mrecSeq.PadChar);
End If;
If mrecSeq.Prefix is not Null Then
mSeqNo := mRecSeq.Prefix || mSeqNo;
End If;
Update IMSSequence
Set SeqNo = Nvl(SeqNo,0) + 1
Where Warehouse_id = pWarehouse_Id
and TableName = pTableName;
pSeqNo := mSeqNo;
Return;
Exception
When Others Then
sp_LogError('Unable generate sequence no for ' || ptablename || ' of ' ||
pWarehouse_Id,
'sf_getSequence', 9);
pSeqNo := -1;
Return;
End;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm