Working in Sql, not working in Stored procedure
Dear friends,
I am puzzled about this strange working of Oracle , although I know that there is some problem with my code. I paste my code here. The delete statement is working properly in SQL Plus 8.0, but it is not working when I call this stored procedure from the Form.
FUNCTION delete_record_treaty (
p_treaty_id T_RIN_TREATY_MST.TRTY_ID_GV%TYPE, p_value VARCHAR2,p_block VARCHAR2 )
RETURN BOOLEAN IS
v_treaty_type varchar2(5);
BEGIN
v_treaty_type := substr(p_treaty_id,1,3);
if p_block !='T_RIN_GRP_DTL' and p_block != 'T_RIN_XOLSLAB_DTL' and p_block!='T_RIN_PMTSCHD_DTL' then
delete from T_RIN_TREATY_MST where TRTY_ID_GV=p_treaty_id ;
commit;
end if;
if v_treaty_type = 'QTA' then
delete from T_RIN_GRP_DTL where TRTY_ID_MV=p_treaty_id and T_RIN_GRP_DTL.ROWID = p_value;
commit;
elsif v_treaty_type = 'XOL' then
delete from T_RIN_XOLSLAB_DTL where TRTY_ID_MV=p_treaty_id ;
delete from T_RIN_PMTSCHD_DTL where TRTY_ID_MV=p_treaty_id ;
elsif v_treaty_type = 'FAC' then
delete from T_RIN_PMTSCHD_DTL where TRTY_ID_MV=p_treaty_id ;
end if;
RETURN(TRUE);
END delete_record_treaty;
Thanks in advance.
All the paramaters that I pass, are correctly being passed to this stored procedure.
null
I solved it.One parameter I was passing it wrongly.
Gee :D
Subramanian V.
Similar Messages
-
when debugging SSIS, the "Execute SQL Task" runs a stored procedure and returns the expected value. When running the package a second time, the task returns an unexpected value. When running in VS2012 SQL editor, everything operates as expected.
Please help me debug how to get the stored proc to return the same value every time the SSIS Package is run. thanks!
Here is the sequence of events and what happens....
Look for a Positor that matches the Application, Host, and User
No matching PositorId is found, Creates new Positor row, returns that new PositorId
Use PositorId to upload some data (Every thing works)
re-run/debug the ssis pacakge
Look for a Positor that matches the Application, Host, and User
<No clue what is happening>
Returns -1 (SHOULD BE the same PositorId value returned in #2)
"Execute SQL Task" Setup: No edits to Result Set nor Expressions
"Execute SQL Task" Setup: GENERAL
"Execute SQL Task" Setup: PARAMETER MAPPING
SP called by "Execute SQL Task"
CREATE PROCEDURE [posit].[Return_PositorId]
AS
BEGIN
DECLARE @PositorId INT = [posit].[Get_PositorId]();
IF (@PositorId IS NULL)
BEGIN
DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
DECLARE @PositorNote NVARCHAR(348) = N'Automatically created by: ' + @ProcedureDesc;
EXECUTE @PositorId = [posit].[Insert_Positor] @PositorNote;
END;
RETURN @PositorId;
END;
Supporting SQL Objects:
CREATE FUNCTION [posit].[Get_PositorId]
RETURNS INT
AS
BEGIN
DECLARE @PositorId INT = NULL;
SELECT TOP 1
@PositorId = [p].[PO_PositorId]
FROM [posit].[PO_Positor] [p]
WHERE [p].[PO_PositorApp] = APP_NAME()
AND [p].[PO_PositorHost] = HOST_NAME()
AND [p].[PO_PositorUID] = SUSER_ID();
RETURN @PositorId;
END;
GO
CREATE PROCEDURE [posit].[Insert_Positor]
@PositorNote NVARCHAR(348) = NULL
AS
BEGIN
DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
SET @PositorNote = COALESCE(@PositorNote, N'Automatically created by: ' + @ProcedureDesc);
DECLARE @Id TABLE
[Id] INT NOT NULL
INSERT INTO [posit].[PO_Positor]([PO_PositorNote])
OUTPUT [INSERTED].[PO_PositorId]
INTO @Id([Id])
VALUES(@PositorNote);
RETURN (SELECT TOP 1 [Id] FROM @Id);
END;
GO
CREATE TABLE [posit].[PO_Positor]
[PO_PositorId] INT NOT NULL IDENTITY(0, 1),
[PO_PositorApp] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorApp] DEFAULT(APP_NAME()),
CONSTRAINT [CL__PO_Positor_PO_PositorApp] CHECK([PO_PositorApp] <> ''),
[PO_PositorName] NVARCHAR(256) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorName] DEFAULT(SUSER_SNAME()),
CONSTRAINT [CL__PO_Positor_PO_PositorName] CHECK([PO_PositorName] <> ''),
[PO_PositorHost] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorHost] DEFAULT(HOST_NAME()),
CONSTRAINT [CL__PO_Positor_PO_PositorHost] CHECK([PO_PositorHost] <> ''),
[PO_PositorSID] VARBINARY(85) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorSID] DEFAULT(SUSER_SID()),
[PO_PositorUID] INT NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorUID] DEFAULT(SUSER_ID()),
[PO_PositorNote] VARCHAR(348) NULL CONSTRAINT [CL__PO_Positor_PO_PositorNote] CHECK([PO_PositorNote] <> ''),
[PO_tsInserted] DATETIMEOFFSET(7) NOT NULL CONSTRAINT [DF__PO_Positor_PO_tsInserted] DEFAULT(SYSDATETIMEOFFSET()),
[PO_RowGuid] UNIQUEIDENTIFIER NOT NULL CONSTRAINT [DF__PO_Positor_PO_RowGuid] DEFAULT(NEWSEQUENTIALID()) ROWGUIDCOL,
CONSTRAINT [UX__PO_Positor_PO_RowGuid] UNIQUE NONCLUSTERED([PO_RowGuid]),
CONSTRAINT [UK__Positor] UNIQUE CLUSTERED ([PO_PositorApp] ASC, [PO_PositorHost] ASC, [PO_PositorUID] ASC),
CONSTRAINT [PK__Positor] PRIMARY KEY ([PO_PositorId] ASC)
GO
ssdThe error is in item 7: Returns -1 (SHOULD BE the same PositorId value returned in #2); but no error message is returned or thrown from SSIS.
The error message indicated referential integrity is not upheld when inserting records. This error message occurs AFTER the Execute SQL Task successfully completes; the E.SQL Task returns -1. The executed SQL code will not allow values less than 0
([PO_PositorId] INT NOT NULL IDENTITY(0, 1),)
[Platts Valid [41]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E2F.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E2F Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E2F Description:
"The INSERT statement conflicted with the FOREIGN KEY constraint "FK__PricingPlatts_Posit_PositorId". The conflict occurred in database "Pricing", table "posit.PO_Positor", column 'PO_PositorId'.".
The aforementioned FOREIGN KEY constraint is due to the value being returned by the Execute SQL Task.; therefore, the error lies in the value returned by the Execute SQL Task. -
Disp+work.exe is not working
Hi Gurus.........i have system ecc6.0 installed , unfortunatly the disp+work.exe is not working (gray in color) .Please help me out.
below is the dev_dsp file details :
trc file: "dev_disp", trc level: 1, release: "700"
sysno 00
sid EC6
systemid 560 (PC with Windows NT)
relno 7000
patchlevel 0
patchno 75
intno 20050900
make: multithreaded, Unicode, optimized
pid 2196
Fri Sep 19 21:26:44 2008
kernel runs with dp version 217000(ext=109000) (@(#) DPLIB-INT-VERSION-217000-UC)
length of sys_adm_ext is 572 bytes
SWITCH TRC-HIDE on ***
***LOG Q00=> DpSapEnvInit, DPStart (00 2196) [dpxxdisp.c 1237]
shared lib "dw_xml.dll" version 75 successfully loaded
shared lib "dw_xtc.dll" version 75 successfully loaded
shared lib "dw_stl.dll" version 75 successfully loaded
shared lib "dw_gui.dll" version 75 successfully loaded
shared lib "dw_mdm.dll" version 75 successfully loaded
rdisp/softcancel_sequence : -> 0,5,-1
use internal message server connection to port 3900
Fri Sep 19 21:26:49 2008
WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 5 seconds
***LOG GZZ=> 1 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c 5273]
MtxInit: 30000 0 0
DpSysAdmExtInit: ABAP is active
DpSysAdmExtInit: VMC (JAVA VM in WP) is not active
DpIPCInit2: start server >gcecc6_EC6_00 <
DpShMCreate: sizeof(wp_adm) 18304 (1408)
DpShMCreate: sizeof(tm_adm) 3994272 (19872)
DpShMCreate: sizeof(wp_ca_adm) 24000 (80)
DpShMCreate: sizeof(appc_ca_adm) 8000 (80)
DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
DpShMCreate: sizeof(comm_adm) 528064 (1048)
DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
DpShMCreate: sizeof(file_adm) 0 (72)
DpShMCreate: sizeof(vmc_adm) 0 (1440)
DpShMCreate: sizeof(wall_adm) (38456/34360/64/184)
DpShMCreate: sizeof(gw_adm) 48
DpShMCreate: SHM_DP_ADM_KEY (addr: 05EF0040, size: 4653368)
DpShMCreate: allocated sys_adm at 05EF0040
DpShMCreate: allocated wp_adm at 05EF1E40
DpShMCreate: allocated tm_adm_list at 05EF65C0
DpShMCreate: allocated tm_adm at 05EF65F0
DpShMCreate: allocated wp_ca_adm at 062C5890
DpShMCreate: allocated appc_ca_adm at 062CB650
DpShMCreate: allocated comm_adm at 062CD590
DpShMCreate: system runs without file table
DpShMCreate: allocated vmc_adm_list at 0634E450
DpShMCreate: allocated gw_adm at 0634E490
DpShMCreate: system runs without vmc_adm
DpShMCreate: allocated ca_info at 0634E4C0
DpShMCreate: allocated wall_adm at 0634E4C8
MBUF state OFF
DpCommInitTable: init table for 500 entries
Fri Sep 19 21:26:50 2008
EmInit: MmSetImplementation( 2 ).
MM global diagnostic options set: 0
<ES> client 0 initializing ....
<ES> InitFreeList
<ES> block size is 1024 kByte.
Using implementation flat
<EsNT> Memory Reset disabled as NT default
<ES> 511 blocks reserved for free list.
ES initialized.
Fri Sep 19 21:26:52 2008
J2EE server info
start = TRUE
state = STARTED
pid = 2628
argv[0] = C:\usr\sap\EC6\DVEBMGS00\exe\jcontrol.EXE
argv[1] = C:\usr\sap\EC6\DVEBMGS00\exe\jcontrol.EXE
argv[2] = pf=C:\usr\sap\EC6\SYS\profile\EC6_DVEBMGS00_gcecc6
argv[3] = -DSAPSTART=1
argv[4] = -DCONNECT_PORT=1044
argv[5] = -DSAPSYSTEM=00
argv[6] = -DSAPSYSTEMNAME=EC6
argv[7] = -DSAPMYNAME=gcecc6_EC6_00
argv[8] = -DSAPPROFILE=C:\usr\sap\EC6\SYS\profile\EC6_DVEBMGS00_gcecc6
argv[9] = -DFRFC_FALLBACK=ON
argv[10] = -DFRFC_FALLBACK_HOST=localhost
start_lazy = 0
start_control = SAP J2EE startup framework
DpJ2eeStart: j2ee state = STARTED
Fri Sep 19 21:26:55 2008
rdisp/http_min_wait_dia_wp : 1 -> 1
***LOG CPS=> DpLoopInit, ICU ( 3.0 3.0 4.0.1) [dpxxdisp.c 1623]
Fri Sep 19 21:27:06 2008
***LOG Q0K=> DpMsAttach, mscon ( gcecc6) [dpxxdisp.c 11586]
Fri Sep 19 21:27:12 2008
DpStartStopMsg: send start message (myname is >gcecc6_EC6_00 <)
DpStartStopMsg: start msg sent
Fri Sep 19 21:27:20 2008
CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
Fri Sep 19 21:28:30 2008
CCMS: start to initalize 3.X shared alert area (first segment).
Fri Sep 19 21:28:33 2008
DpJ2eeLogin: j2ee state = CONNECTED
DpMsgAdmin: Set release to 7000, patchlevel 0
MBUF state PREPARED
MBUF component UP
DpMBufHwIdSet: set Hardware-ID
***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c 1050]
DpMsgAdmin: Set patchno for this platform to 75
Release check o.K.
Fri Sep 19 21:28:52 2008
ERROR => W0 (pid 2636) died [dpxxdisp.c 14241]
ERROR => W1 (pid 2644) died [dpxxdisp.c 14241]
ERROR => W2 (pid 2652) died [dpxxdisp.c 14241]
ERROR => W3 (pid 1632) died [dpxxdisp.c 14241]
ERROR => W4 (pid 908) died [dpxxdisp.c 14241]
ERROR => W5 (pid 2660) died [dpxxdisp.c 14241]
my types changed after wp death/restart 0xbf --> 0xbe
ERROR => W6 (pid 2668) died [dpxxdisp.c 14241]
my types changed after wp death/restart 0xbe --> 0xbc
ERROR => W7 (pid 2676) died [dpxxdisp.c 14241]
my types changed after wp death/restart 0xbc --> 0xb8
ERROR => W8 (pid 2684) died [dpxxdisp.c 14241]
ERROR => W9 (pid 640) died [dpxxdisp.c 14241]
ERROR => W10 (pid 2692) died [dpxxdisp.c 14241]
my types changed after wp death/restart 0xb8 --> 0xb0
ERROR => W11 (pid 2700) died [dpxxdisp.c 14241]
my types changed after wp death/restart 0xb0 --> 0xa0
ERROR => W12 (pid 732) died [dpxxdisp.c 14241]
my types changed after wp death/restart 0xa0 --> 0x80
DP_FATAL_ERROR => DpWPCheck: no more work processes
DISPATCHER EMERGENCY SHUTDOWN ***
increase tracelevel of WPs
NiWait: sleep (10000ms) ...
NiISelect: timeout 10000ms
NiISelect: maximum fd=1637
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Fri Sep 19 21:29:02 2008
NiISelect: TIMEOUT occured (10000ms)
dump system status
Workprocess Table (long) Fri Sep 19 15:59:02 2008
========================
No Ty. Pid Status Cause Start Err Sem CPU Time Program Cl User Action Table
0 DIA 2636 Ended no 1 0 0
1 DIA 2644 Ended no 1 0 0
2 DIA 2652 Ended no 1 0 0
3 DIA 1632 Ended no 1 0 0
4 DIA 908 Ended no 1 0 0
5 DIA 2660 Ended no 1 0 0
6 UPD 2668 Ended no 1 0 0
7 ENQ 2676 Ended no 1 0 0
8 BTC 2684 Ended no 1 0 0
9 BTC 640 Ended no 1 0 0
10 BTC 2692 Ended no 1 0 0
11 SPO 2700 Ended no 1 0 0
12 UP2 732 Ended no 1 0 0
Dispatcher Queue Statistics Fri Sep 19 15:59:02 2008
===========================
--------++++--
+
Typ
now
high
max
writes
reads
--------++++--
+
NOWP
0
1
2000
1
1
--------++++--
+
DIA
5
5
2000
5
0
--------++++--
+
UPD
0
0
2000
0
0
--------++++--
+
ENQ
0
0
2000
0
0
--------++++--
+
BTC
0
0
2000
0
0
--------++++--
+
SPO
1
1
2000
1
0
--------++++--
+
UP2
0
0
2000
0
0
--------++++--
+
max_rq_id 10
wake_evt_udp_now 0
wake events total 6, udp 2 ( 33%), shm 4 ( 66%)
since last update total 6, udp 2 ( 33%), shm 4 ( 66%)
Dump of tm_adm structure: Fri Sep 19 15:59:02 2008
=========================
Term uid man user term lastop mod wp ta a/i (modes)
Workprocess Comm. Area Blocks Fri Sep 19 15:59:02 2008
=============================
Slots: 300, Used: 1, Max: 0
--------++--
+
id
owner
pid
eyecatcher
--------++--
+
0
DISPATCHER
-1
WPCAAD000
NiWait: sleep (5000ms) ...
NiISelect: timeout 5000ms
NiISelect: maximum fd=1637
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Fri Sep 19 21:29:07 2008
NiISelect: TIMEOUT occured (5000ms)
DpHalt: shutdown server >gcecc6_EC6_00 < (normal)
DpJ2eeDisableRestart
MsIDelService: delete service J2EE for myself
NiBufSend starting
NiIWrite: hdl 3 sent data (wrt=161,pac=1,MESG_IO)
MsINiWrite: sent 161 bytes
send msg (len 110+51) to name MSG_SERVER, type 0, key -
MsSndName: MS_DEL_PROPERTY ok
Send 51 bytes to MSG_SERVER
MS_DEL_PROPERTY : asynchronous call
send MsDelService(J2EE) to msgserver
DpIJ2eeShutdown: send SIGINT to SAP J2EE startup framework (pid=2628)
killing process (2628) (SOFT_KILL)
DpIJ2eeShutdown: j2ee state = SHUTDOWN
NiBufISelUpdate: new MODE -- (r-) for hdl 4 in set0
SiSelNSet: set events of sock 1508 to: ---
NiBufISelRemove: remove hdl 4 from set0
SiSelNRemove: removed sock 1508 (pos=2)
SiSelNRemove: removed sock 1508
NiSelIRemove: removed hdl 4
DpDelSocketInfo: del info for socket 4 (type=8)
NiICloseHandle: shutdown and close hdl 4 / sock 1508
NiBufIClose: clear extension for hdl 4
DpModState: buffer in state MBUF_PREPARED
NiBufSend starting
NiIWrite: hdl 3 sent data (wrt=110,pac=1,MESG_IO)
MsINiWrite: sent 110 bytes
MsIDetach: send logout to msg_server
MsIDetach: call exit function
DpMsShutdownHook called
NiBufISelUpdate: new MODE -- (r-) for hdl 3 in set0
SiSelNSet: set events of sock 1536 to: ---
NiBufISelRemove: remove hdl 3 from set0
SiSelNRemove: removed sock 1536 (pos=3)
SiSelNRemove: removed sock 1536
NiSelIRemove: removed hdl 3
MBUF state OFF
AdGetSelfIdentRecord: > <
AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
blks_in_queue/wp_ca_blk_no/wp_max_no = 1/300/13
LOCK WP ca_blk 1
make DISP owner of wp_ca_blk 1
DpRqPutIntoQueue: put request into queue (reqtype 1, prio LOW, rq_id 16)
MBUF component DOWN
NiICloseHandle: shutdown and close hdl 3 / sock 1536
NiBufIClose: clear extension for hdl 3
MsIDetach: detach MS-system
cleanup EM
EsCleanup ....
EmCleanup() -> 0
Es2Cleanup: Cleanup ES2
***LOG Q05=> DpHalt, DPStop ( 2196) [dpxxdisp.c 10259]
Good Bye .....The work process are dying
ERROR => W1 (pid 2644) died [dpxxdisp.c 14241] *** ERROR => W2 (pid 2652) died [dpxxdisp.c 14241
This lead the dispatcher to emergency shutdow:
DISPATCHER EMERGENCY SHUTDOWN ***
if the dispatcher cannot start the work process it force the shutdown.So, you need to check
at the work process trace (dev_w*) files to find out the reason the they are dying.
@deeptss
if you are talking about the WARNING
WARNING => DpNetCheck: NiAddrToHost(1.0.0.0)took 5 seconds ***
this is a normal situation if the reverse name resolution is not working.
I have found this error when the DNS server has without the reverse zone configured.
However this is not a problem to the dispatcher operation.
Cheers
Clebio -
My camera is working but does not work on skype how do I turn the camera on for Skype
My camer is working but does not work on skype how do I turn the camera on.
See this thread:
https://discussions.apple.com/thread/5306216?tstart=0
FIX:
1. You need Time Machine
2. Go to folder /Library/CoreMediaIO/Plug-Ins/DAL/
3. Copy AppleCamera.plugin to good place (usb memory stick is the best place).
4. Go to Time machine in date that skype work fine.
5. Change AppleCamera.plugin with file from Time Machine
6. Restart system, Now skype need to work with camera.
If that doesnt pass,
Suggest looking here, much success has been found:
http://community.skype.com/t5/Mac/OS-X-10-8-5-broke-Video-on-MacBook-Air/td-p/18 91729/page/4 -
Conversion of java Array to oracle SQL Array while calling Stored Procedure
How java Array can be converted to oracle SQL array while calling Stored procedure with callable statement.
i.e java Array ---> Sql Array in Oracle while setting the datatypes to callable statement arguments.Look at:
http://forum.java.sun.com/thread.jsp?forum=48&thread=376735&tstart=0&trange=15
Paul -
Writing mulitple sql statements in 1 stored procedure
Hi all, can i know how to create mulitple sql statements in 1 stored procedure??
Eg the first sql statement will generate few results and my second sql statement will based on the first statement result to execute its second results and my third sql statements will on the second results to generate the final results which will be passed back to jsp pages as a resultset??
For the time being, i only know how to create a single sql statement in one stored procedure..i had surf through the oracle website but cant find any solution. Can anyone help me?? Samples or links to any website will do.. Thanks alot...Hi Irene,
If I understand your question correctly, then I have already written
a similar (PL/SQL) stored procedure without any problems.
However, I do think your question is more suited to the following
forum:
http://forums.oracle.com/forums/forum.jsp?id=478021
I also think it will help others to answer your question if you
include the following information:
1. Version of Oracle you are using.
2. The error message you are getting.
3. The part of your code that is causing the problem.
Also, have you looked at the following web sites?
http://asktom.oracle.com
http://metalink.oracle.com
Good Luck,
Avi. -
Extraction SQL statement from oracle stored procedure stored in file
Hi,
I am newbie to oracle stored procedure. I need to extract the list of sqls present in oracle stored procedure. Besides that I also want to parse these sql statements to get the list of tables and columns used. Is there any tool which can help me in doing thats.
thanks,
govindwhy don't check on user_dependencies table instead?
select referenced_name,referenced_type
from user_dependencies
where name='<your stored procedure name in upper case>'
and referenced_type = 'TABLE'HTH,
Prazy -
I tried to update, did not work, unintstalled did not work. Now when I try to install i get error message "The feature you are trying to use is on a network resource tha is unabailable. Looking for itunes64.msi path.
(1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
http://majorgeeks.com/download.php?det=4459
(2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
(3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
(4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
(5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time? -
Why Dynamic Parameter is not working, when i create report using stored procedure ?
Post Author: Shashi Kant
CA Forum: General
Hi all
Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
is not shown to me when i referesh the report for viewing the results.
I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
============================================================================================
1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
Dynamic Parameters in Action
My question is that whether dynamic parameter is working with storedprocedure or not.
When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
Please reply soon , it's urgent
Regards
shashi kantHi Kishore,
I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
=lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
As to the second issue, please try to use the following expression:
=Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl file with all the size properties to us by the following E-mail address? It is benefit for us to do further analysis.
E-mail: [email protected]
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
JDBC (SQL) not working in thread
I was surprised by a strange (bug?)
I had two programs that were implementing the Java Serial Port API, each interfaced to a specific instrument. I was asked to combine the two programs into one, run it on one workstation, and run it as a service. This is on an W2K machine and they want it to work even if no one is logged in.
Well, I started each class as a serial port listener and a runnable, thinking it might be best for each listener to have its own thread. That runs just fine. But, one of the instruments sends a lot of data, so once I had a buffer full of stuff to parse and upload (to Oracle), is started another processing thread to handle the data, and let the parent thread get back to listening to the serial port.
Well, I parsed the data just fine, but after I created the connection, created a statement, and then tried to execute a line of SQL, it just stopped, no exceptions, but no results. I keep a log of what is going on, and it looks like the thread just dies.
So, for experimenation, I changed the parent threads back to plain classes and created the instances of them, still leaving the processing piece as a thread. (The only draw back to this is that I cannot transmit from both instruments at the same time.) Well, the SQL worked fine, so I am wondering if there is a problem with the JDBC and threads, or inner threads?
Anyone have any suggestions?
Thanks,As I understand it, your code does not work only when you run it as a service. Although I may well not understand it (for example I don't know what you think an "inner" thread is, and I don't understand your distinction between "class" and "thread", since everything runs in some thread or other in Java).
Is this correct? Have you managed to get the original (single instrument) code running as a service? My guess is that there's nothing wrong with Java, but there is some issue with running it as a service. -
I have 4 statements.
echo off
plus80 / @z:\nesp1483_batch
plus80 / @z:\nesp1484a_batch
exit
The first statement plus80 / @z:\nesp1484_batch inserts records into a table and creates a report and deletes the table.
However the second statement plus80 / @z:\nesp1484a_batch is not working properly. I want it to insert records into a table, create a report and then delete the table but it is not working properly. It is hanging up on this statement.
I need to say plus80 to get the program to execute properly.
I have also tried sqlplus /@z:\nesp1484a_batch but this does not work either.
What do I need to do to make the third statement to execute properly?I know that it is not working
because the response time is slow and I have over 15 minutes
and nothing is happening. How do you know it is not working as opposed to just working slow?
Do you have any logging routines in your code? If you have, switch on them on and see what's happening. If not, now is a good time to think about including them...
Cheers, APC -
PL/SQL vs. Java stored procedures.
After learning about PL/SQL I have to admit it looks ugly to me. Is there any concrete reasons why PL/SQL should be used over Java for stored procedures. I understand that PL/SQL is native to Oracle and procedures written in PL/SQL would probably out perform Java procedures, but what if performance was not the most critical issue. Looking at PL/SQL makes me think it would be hard to maintain.
Thanks in advance.Hi
There is a common mis-understanding here. 2008 will be the last year oracle is going to support Developer in Client server mode. Oracle does not claim to discontinue Developer, They are currently working on Developer Rel9i, which is truely a multi tiered archtecture. PLSQL will live as long as Oracle database lives.
PLSQL is simple yet powerful language, it is getting better with each version. With the new 9i release, it is truely object oriented like any OO language like Java/C etc. Further you can override methods in Objects and override them in C, Java, PLSQL etc. What this means is that you can have a parent Object and have some method x implemented in PLSQL, you can then inherit another object from the parent object and override the same method x, this time you can write the method x in java or C. No other language can offer this feature. Further PLSQL also provides you with dynamic typing, like most other OO languages. These are some of the features of PLSQL.
And ofcourse, the language you choose is purely a matter of choice. If you are going to write a database-centric application, PLSQL might be a right choice as it facilitates many things for us like exception handling, transaction etc.
If you are writing a generic application that can interact with any database, then java might be a right choice as you and encapsulate the information in the language.
HTH
Arvind Balaraman -
JDBC SQL Server Channel Calling Stored Procedure Won't Return Result Set
Good afternoon, Experts
We're calling a stored procedure in a sender communcation channel. I can perform any SQL SELECT statement here, but for some reason when I execute the SP (EXECUTE StoredProcedureName) The Adapter Engine returns the following:
Database-level error reported by JDBC driver while executing statement 'DECLARE @UpdateRecords bit SET @UpdateRecords = 0 EXECUTE ExportToSAP @UpdateRecords'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor.
Even stranger yet is is that this works just fine on our PI-DEV system. I created an identical communication channel connecting to the same database with the same UID and PWD and it won't work in PI-QAS.
Any help/ideas you could share would be greatly appreciated!!!
Thanks,
ChadHi Chad.
Normally, itu2019s a problem with your procedure. The Store Procedure is wrong and something is different between your DEV environment and QAS environment.
Try to ask to DB team check it.
Regards,
Bruno -
SQL toolkit 2.2 Stored Procedure Memory Leaks
Hi
we are using CVI 2012 and SQL Toolkit 2.2. My db is "MySql 5.5.28" and I use "MySQL Connector/ODBC 5.2(w)"
I use only stored procedure (with and without the output parameters). If I call continuously a stored procedure,
with Sql toolkit code, I have memory leaks!!
My code (without error handler) is:
// iDbConnId is the handle of DBConnect() called when program starts
iStmt = DBPrepareSQL(iDbConnId, "spGetPrData");
DBSetStatementAttribute(iStmt, ATTR_DB_STMT_COMMAND_TYPE, DB_COMMAND_STORED_PROC);
DBExecutePreparedSQL(iStmt);
DBBindColLongLong(iStmt, 1, &llPrId, &lStatus1);
DBBindColInt(iStmt, 2, &iIpPort, &lStatus2);
while(DBFetchNext(iStmt) != DB_EOF)
//get data
DBClosePreparedSQL(iStmt);
DBDiscardSQLStatement(iStmt);
If I call the same stored procedure by sql code ("CALL spProcedure()")
I don't have memory leaks!!
The code is (without error handler):
// iDbConnId is the handle of DBConnect() called when program starts
iStmt = DBActivateSQL(iDbConnId, "CALL spGetPrData();");
DBBindColLongLong(iStmt, 1, &llPrId, &lStatus1);
DBBindColInt(iStmt, 2, &iIpPort, &lStatus2);
while(DBFetchNext(iStmt) != DB_EOF)
//get data
DBDeactivateSQL (iStmt)
It seems to me that the DBDeactivateSQL function free the memory correctly,
while the functions DBClosePreparedSQL and DBDiscardSQLStatement do not release properly the memory,
(or I use improperly the library functions!!!)
I also have a question to ask:
Can I open and close the connection every time I connect to the database or is it mandatory to open and close it just one time?
How can I check the status of the database connection, if is mandatory to open and close the db connection just one time?
Thanks for your help.
Best Regards
PatrizioHi,
one of the functions "DBClosePreparedSQL and DBDiscardSQLStatement" is a known problem. In fact, there is a CAR (Corrective Action Request 91490) reporting the problem. What version of the toolkit are you using?
About this function you refer to the manual:
http://digital.ni.com/manuals.nsf/websearch/D3DF4019471D3A9386256B3C006CDC78
Where functions are described. To avoid memory leaks DBDeactivateSQL must be used. DBDeactivateSQL is equivalent to calling DBCloseSQLStatement, then DBDiscardSQLStatement. DBDeativateSQL will work at all for parameterized SQL, as well.
Regarding the connection mode advice to you is to open the connection once and close it at the end of your operations. What do you mean with "state of the database connection"? Remember that if you have connection problems or something goes wrong, the errors appears in any point in your code where you query the database. Bye
Mario -
Behaviour of 'NOT IN' in Stored Procedure
Hello,
I am encountering an abnormal behavior of 'NOT IN' in my .hdbprocedure. It was working fine a couple of days ago but today it doesn't yield any result.
If I execute the same query via SQL Console ( replacing sub query for col2 with hardcoded values), it works fine. If I replace NOT IN with <> , it works fine.
I am on SP7 rev 73.
CREATE PROCEDURE "TEST".TEST_PROC" (in RECORD_TYPE varchar(2))
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
DEFAULT SCHEMA "TEST"
AS
BEGIN
/* CHECKING FOR THE RECORD TYPE FROM THE INPUT PARAMETER */
If :RECORD_TYPE = 'R' THEN
items[1] := 'R';
items[2] := 'D' ;
ELSEIF :RECORD_TYPE = 'MR' THEN
items[1] := :RECORD_TYPE;
END IF;
/* Unnesting the array to a
table variable */
v_table = UNNEST(:items) AS ("REC_TYPE");
Insert into
new_table(col1,col2,col3,col4)
-- the following select doesnt
return any record in proc; whereas it returns records when run on SQL console
Select distinct col1,col2,col3,col4
from TABLE_INPUT
where
COALESCE(col1,0) NOT in (Select Parameter_Value from T_CONFIG where Parameter_name = 'check'
and pack ='GENERAL' and Active='1')
and col2 IN (SELECT REC_TYPE FROM :v_table);
END;Thanks for your response Patrick.
Your suggestion should work too but I am curious as to why 'NOT IN' is not working now.
As I mentioned earlier that '<>' or NOT EXIST can work, but if I have to make this change then I
would have to do it in the entire codebase; just to be sure that I do not encounter this issue again.
Tarun
Maybe you are looking for
-
ERROR MESSAGE WHEN TRYING TO SAVE A DOCUMENT IN WORD
I'm trying to save changes to a document in word but I keep getting an error message telling me that it can't save it due tofile permission error. Can anyone help I really need this document.
-
Unable to view Essbase App in Smartview
Hello all, I am new to Essbase so I apologize if this is a silly question. I have created a new Essbase application but I am unable to view it in Smartview (using version 11.1). The Common Provider Connections does not refresh the list based on the n
-
How many messages are in my inbox?
I used to be able to see the total number of messages in my Mail inbox. I can no longer! If I click on the individual accounts, e.g., "Exchange" or "Google", then I do see the count at the top of the Message Viewer window. But if I click on the InBox
-
How to dynamically Set the list of flex contexts based on a condition
Database is in 11i atg rup7 level first OAF page - shows list of employees under a manager on clicking an employee record, the second OAF page opens and it shows a set of records from descriptive flexfield. Currently 5 contexts of the same flexfield
-
Forms Runtime Process and OC4J - Can I separate them?
Hello, I was reading a Oracle Application Server Forms 10g material. One thing that come to my mind was that can Forms Runtime Process run in physically different host than OC4J J2EE Application Server? Does anyone have any information of this issue?