List as function parameter type
Hi,
how to declare list parameter type in function ? I want to call function with list, param2 = ('A', 'B', 'C'...) for example: function(param1, param2)
thx
Two ways....
either you know you have a maximum number of parameters allowed and specify it such as ...
e.g. with a maximum of 10 params...
FUNCTION myfunc (p_param1 IN VARCHAR2 := NULL
,p_param2 IN VARCHAR2 := NULL
,p_param3 IN VARCHAR2 := NULL
,p_param4 IN VARCHAR2 := NULL
,p_param5 IN VARCHAR2 := NULL
,p_param6 IN VARCHAR2 := NULL
,p_param7 IN VARCHAR2 := NULL
,p_param8 IN VARCHAR2 := NULL
,p_param9 IN VARCHAR2 := NULL
,p_param10 IN VARCHAR2 := NULL) IS
...or you pass in an array...
TYPE t_params IS TABLE OF VARCHAR2 INDEX BY PLS_INTEGER;
FUNCTION myfunc (p_params IN t_params) IS
...You can't code it for an unknown amount of parameters.
Similar Messages
-
Question on the parameter type of DLL functions
Question on the parameter type of DLL functions
I am trying to develop an interface to control a laser with LV8.2 I am planing to use the VI “Call Library Function Node” to call the DLL and set the exact same parameters of functions in the DLL.
According to the DLL manual of the laser, there are six functions. One of the prototypes is: function getstatuspointer : pointer. I don't know how to set this parameter for the function. Is there anyone who can give some hints? Thanks!
BTW :The following is a description of the function:
This function returns a 32 bit pointer to the STATUS data structure (Tstatusrec). In the 32 bit DLL, every application is using its own copy of the data structure (local
memory). The data structure is a packed structure. "packed" means that the fields in the structure are not aligned on word or double-word boundaries.
Tstatusrec = packed record
size : word;
initstat : byte;
queuefill : byte;
anzapp16 : word; (not used)
anzapp32 : word;
anzdock16 : word; (not used)
anzdock32 : word;
dll16ver : tchararray; (not used)
dll32ver : tchararray;
excimerver : tchararray;
excimer : TExcimerStatus;
end;Hi Jack,
This is a good starting point when using Call Library Function node. Check out this Help Page
Van L
NI Applications Engineer -
How to use INVOKE function with INT parameter types
Can you tell me how to use invoke function with int parameter type ?
Pass the int as an Integer.
-
How to pass "EnterpriseManagementObject" Type as Function parameter?
Hello, dear Colleagues.
I'm trying to pass "EnterpriseManagementObject" as Function parameter.
Here is the piece of code:
$SCSM = 'SERVER_NAME'
function Add-Comment {
param (
[parameter(Mandatory=$true,Position=0)][Alias('Id')][String]$pSRId,
[parameter(Mandatory=$true,Position=1)][Alias('Comment')][String]$pComment,
[parameter(Mandatory=$true,Position=2)][Alias('EnteredBy')][String]$pEnteredBy,
[parameter(Mandatory=$true,Position=3)][Alias('IsAnalyst')][Bool]$AnalystComment,
[parameter(Mandatory=$true,Position=4)][Alias('IRObject')][EnterpriseManagementObject]$IRObject
if ($IRObject) {
$NewGUID = ([guid]::NewGuid()).ToString()
if ($AnalystComment)
$Projection = @{__CLASS = "System.WorkItem.Incident";
__SEED = $IRObject;
AnalystComments = @{__CLASS = "System.WorkItem.TroubleTicket.AnalystCommentLog";
__OBJECT = @{"Id" = $NewGUID;
Comment = $pComment;
DisplayName = $NewGUID;
EnteredBy = $pEnteredBy;
EnteredDate = (Get-Date).ToUniversalTime();
IsPrivate = $false
New-SCSMObjectProjection -Type System.WorkItem.IncidentPortalProjection -Projection $Projection -ComputerName $SCSM -ErrorAction stop
} else {
Write-Host $pSRId "could not be found"
$IncidentClass = Get-SCSMClass -name System.WorkItem.Incident$ -ComputerName $SCSM
$Incident = Get-SCSMObject -Class $IncidentClass -Filter "name -eq $c" -ComputerName $SCSM
Add-Comment -Id $c -Comment $text -EnteredBy $name -IsAnalyst $False -IRObject $Incident -ErrorAction stop
With GetType() I watched $Incident is "EnterpriseManagementObject":
IsPublic IsSerial Name BaseType
True True EnterpriseManagementObject Microsoft.EnterpriseManagement.Common.EnterpriseManagementObjectBaseWithProperties
But PS script returns error TypeNotFound:
Add-Comment : Unable to find type [EnterpriseManagementObject]. Make sure that the assembly that contains this type is loaded.
At C:\script.ps1:146 char:13
+ Add-Comment -Id $c -Comment $text -EnteredBy $name -IsAnalyst $True ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (EnterpriseManagementObject:TypeName) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound
Is there a way to pass "EnterpriseManagementObject" as Function parameter?
Thanks.First of all the error indicates that you haven't loaded the assembly which contains the class you're trying to load.
Try loading the assembly by running:
[Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.Core") | Out-Null
Secondly if you want to use type based parameters restrictions you should use full type name, which can be found with the command:
$SomeObject.GetType().FullName
You should end up with: Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject -
Passing a list as a parameter to a function
Hi,
I am relatively new to PL/SQL, but am used to passing lists to functions in other languages. In my PL/SQL function, currently I assign a SELECT to a cursor, and in the WHERE clause for the select, I have something hardcoded like
WHERE field_name = ('apple', 'bat', 'cat').
I would like to replace it by something like
WHERE field_name = list_name
where list_name is passed as a parameter to the function that I am defining. The reason I want to do this is because my list_name can have many more than three things in the future.
Does PL/SQL support an easy way to do this? I have asked around with no success, but it seems to me that a language like PL/SQL ought to have something to support it, since just about every modern language does.
Thanks,
Regards,
SriniThe trickiest part of the asktom solution is ensuring the cardinality hint is used to help the optimizer understand that the in-list you are building likely contains only a handful of values instead of it 1 whole block worth assumption.
The default assumption without the cardnility hint will ensure that an index on the column that is used for the IN clause will never be used, resulting in horrible performance.
I think 10g fixes this, and does some dynamic sampling of the collections returned through that approach. I am not quite 100% sure about that, but I think that is the case. -
Pass rowtype as function parameter, as a Object like type. How?
Hi.
I have the following question.
I have 3 tables:
TAB1
TAB2
TAB3
I declare 3 rowtypes variables, one for each table:
v_tab1 TAB1%ROWTYPE;
v_tab2 TAB2%ROWTYPE;
v_tab3 TAB3%ROWTYPE;
I want to pass a rowtype as a function parameter, but i want the function to allow any rowtype to be passed as parameter, and then inside the function convert that "object" to the correct rowtype.
Is that possible?
In another language like C# for example, i would pass the rowtype as a object type, and then cast it to the correct data type.
I hope you can help me.
Cheers.To do this they would have to be object types, and have a common supertype.Alternatively unrelated object types could be abstracted away with ANYDATA.
There is no such functionality exposed / documented for records - although the signatures of several built-in packages suggest that a mechanism for passing ADTs as formal parameters does actually exist. -
Pass TestStand error type directly into function parameter
Hi,
I am using TestStand 4 and Labwindows CVI 8.5.
I wonder if it is possible to pass Standard Step error type into CVI function parameters.
I think it would be more simple to pass one parameter instead of passing Error code, Error occurred state and Error message into function prototype.
I tried to use tsErrorDataType struct defined into tsutil.h into my function prototype.
In TestStand, I pass Step error type into function parameter but it does not work.
TestStand displays an error meaning parameters does not match function prototype.
Thank you for your help.Hi Tartempion,
In order to pass the TestStand Error Container as one parameter to a function in a CVI DLL, you must use a struct that is typedef'ed and create an .fp file that is included as a type library for the DLL. When you create a .fp file to add to a DLL, the DLL will not build unless all structs/enums are typedef'ed. Thus, I wouldn't advise using the tsutil.h because you would have to go through and typedef every single struct and enum in the header file.
Instead, you can simply create a typedef'ed struct in your projects header file and create an .fp file with the struct specified as a data type. Then in TestStand, when you call the function you would need to ensure that the parameter is of Category "C Struct", and type "Error". The attached zip file contains a CVI 8.5 project that demonstrates this along with a TestStand 4.0 sequence file that demonstrates how to pass the parameter to the function by reference. In case you run into trouble creating the .fp file please refer to the following KnowledgeBase. The instructions are for enums but easily correspond to structs as well:
TestStand and LabWindows/CVI Enumeration Data Types
Hope this helps!
Manooch H.
National Instruments
Attachments:
PassTSError.zip 19 KB -
Error while calling FM : Function parameter "PE_LFA1" is unknown
Dear Experts,
I am trying to call a FM in my code, but somehow I am getting the following error .Please help !
My code is :
DATA : VENDOR_NO TYPE WSRS_SHVDST_RES-VENDOR_NO,
PE_LFA2 TYPE LFA1,
PE_ADDR2 TYPE BAPIADDR1,
PE_ADRPRT2 TYPE WISO_ADRPRT,
PE_RETURN2 TYPE WSRS_RETURN,
PE_LFM2 TYPE LFM1,
PE_LFB2 TYPE LFB1.
DATA:
node_vendor TYPE REF TO if_wd_context_node,
elem_vendor TYPE REF TO if_wd_context_element,
stru_vendor TYPE if_vendor_view=>element_vendor ,
item_vendorinp LIKE stru_vendor-vendorinp.
navigate from <CONTEXT> to <VENDOR> via lead selection
node_vendor = wd_context->get_child_node( name = if_vendor_view=>wdctx_vendor ).
get element via lead selection
elem_vendor = node_vendor->get_element( ).
get single attribute
elem_vendor->get_attribute(
EXPORTING
name = `VENDORINP`
IMPORTING
value = item_vendorinp ).
VENDOR_NO = item_vendorinp.
CALL FUNCTION 'WSRS_O_VENDOR_GET_DETAIL'
EXPORTING
PE_LFA1 = PE_LFA2
PE_ADDR1 = PE_ADDR2
PE_ADRPRT = PE_ADRPRT2
PE_RETURN =PE_RETURN2
PE_LFM1 = PE_LFM2
PE_LFB1 = PE_LFB2
IMPORTING
PI_VENDOR_NO = VENDOR_NO.
My Error is :
Note
The following error text was processed in the system HE6 : Function parameter "PE_LFA1" is unknown.
The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 5 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: ONACTIONFETCH_VENDOR_DETAILS of program /1BCWDY/A8XPPCRFM5I0CTSGLFDT==CP
Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/A8XPPCRFM5I0CTSGLFDT==CP
Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
Please help.Hi,
I will ask this way, from where did you get list of parameters for this FM? Try using pattern to call this FM, than you will be proposed with correct interface.
EDIT:
After checking it in system you should switch IMPORTING and EXPORTING
CALL FUNCTION 'WSRS_O_VENDOR_GET_DETAIL'
EXPORTING
PI_VENDOR_NO = '99'
* PI_ACCEPT_NOTFOUND =
* PI_PURCH_ORG =
* PI_COMP_CODE =
IMPORTING
PE_LFA1 = lv
* PE_ADDR1 =
* PE_ADRPRT =
* PE_RETURN =
* PE_LFM1 =
* PE_LFB1 =
Best regards
Marcin Cholewczuk
Edited by: Marcin Cholewczuk on Apr 12, 2011 1:20 PM -
How to get a vendor list for a event type in training and events
Hi
i need to get a vendor list for the event type.
is there any function module to get the vendor name and vendor no if event type is passed.
kindly help me...
With regards
Rusidar.Dear Pushpa,
Transaction Code :SHD0 is working fine.
Please accept my sincere thanks for your sharing your Knowledge.
I am able to fulfill my
Regarding the enhancement, I have not tried.
Once I will complete, I will award the fulll marks to you.
With Best Regards,
Raghu Sharma -
Hello.
During developing Domain Index for Oracle 11.2.0.1.0 (problem also appears in 12с) i was faced with misunderstanding of parameter types of function
ODCIIndexInsert in case of creating indextype WITH ARRAY DML option
According to Oracle documentation
http://docs.oracle.com/cd/E11882_01/appdev.112/e10765/ext_idx_ref.htm#i76892
In case of WITH ARRAY DML option Oracle will invoke ODCIIndexInsert with following signature
FUNCTION ODCIIndexInsert(
ia ODCIIndexInfo,
ridlist ODCIRidList,
newvallist varray_of_column_type,
env ODCIEnv)
RETURN NUMBER
In my case indexed column has datatype NUMBER so i defined varray_of_column_type as SYS.ODCINumberList
STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList, newvallist in sys.ODCINumberList, env in SYS.ODCIEnv) RETURN NUMBER
Indextype was created as
CREATE INDEXTYPE test_index_type
FOR
test_eq(number, number)
USING index_methods
WITH ARRAY DML(number, sys.ODCINumberList)
WITH LOCAL RANGE PARTITION
WITH SYSTEM MANAGED STORAGE TABLES;
or
CREATE INDEXTYPE test_index_type
FOR
test_eq(number, number)
USING index_methods
WITH ARRAY DML
WITH LOCAL RANGE PARTITION
WITH SYSTEM MANAGED STORAGE TABLES;
(problem occurs in all cases)
CREATE TABLE test_table (id NUMBER (19,0));
CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type;
When attempting to insert data in the table
insert into test_table values (1);
oracle raise exception
Error starting at line 53 in command:
insert into test_table values (1)
Error at Command Line:53 Column:1
Error report:
SQL Error: ORA-29925: cannot execute SCOTT.INDEX_METHODS.ODCIINDEXINSERT
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ODCIINDEXINSERT'
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ODCIINDEXINSERT'
29925. 00000 - "cannot execute %s"
*Cause: The specified function does not exist or does not have an
appropriate signature.
*Action: Implement the function with the appropriate signature.
So my question is.
Is it normal behavior of oracle (according to documentation)?
What is correct signature of ODCIIndexInsert function in case of INDEXTYPE creation with 'WITH ARRAY DML' option and fact that indexed column has NUMBER datatype?
By the way if i define indextype without 'WITH ARRAY DML' option signature is clear, and working. But this approach doesn't satisfies our performance needs.
Also if i define index type with option 'WITH ARRAY DML WITHOUT COLUMN DATA' and use signature
static function ODCIIndexInsert(ia sys.odciindexinfo, ridlist sys.odciridlist, env sys.ODCIEnv) return number
Everything works too. But this approach doesn't satisfies our business needs.
Is it a way to define ODCIIndexInsert parameter types (in case of indexing number column) so that batch inserting works according to documentation ?
FUNCTION ODCIIndexInsert(
ia ODCIIndexInfo,
ridlist ODCIRidList,
newvallist varray_of_column_type,
env ODCIEnv)
I am attaching full sql script to recreate environment and reproduce the problem.
Type definition:
CREATE OR REPLACE TYPE index_methods AS OBJECT
step number,
STATIC FUNCTION ODCIGetInterfaces(ifclist OUT SYS.ODCIObjectList) RETURN NUMBER,
STATIC FUNCTION ODCIIndexCreate (ia SYS.ODCIIndexInfo, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexAlter (ia sys.ODCIIndexInfo, parms IN OUT VARCHAR2, altopt number, env sys.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexDrop(ia SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexExchangePartition(ia SYS.ODCIIndexInfo, ia1 SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexUpdPartMetadata(ia sys.ODCIIndexInfo, palist sys.ODCIPartInfoList, env sys.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList, newvallist in sys.ODCINumberList, env in SYS.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexDelete(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, env SYS.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexUpdate(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, newval number, env SYS.ODCIEnv) RETURN NUMBER,
STATIC FUNCTION ODCIIndexStart(sctx IN OUT index_methods, ia SYS.ODCIIndexInfo,
op SYS.ODCIPredInfo, qi sys.ODCIQueryInfo, strt number, stop number, cmpval number, env SYS.ODCIEnv) RETURN NUMBER,
MEMBER FUNCTION ODCIIndexFetch(self IN OUT index_methods, nrows NUMBER, rids OUT SYS.ODCIridlist, env SYS.ODCIEnv) RETURN NUMBER,
MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER
CREATE OR REPLACE TYPE BODY index_methods IS
STATIC FUNCTION ODCIGetInterfaces(ifclist OUT sys.ODCIObjectList) RETURN NUMBER IS
BEGIN
ifclist := sys.ODCIObjectList(sys.ODCIObject('SYS','ODCIINDEX2'));
RETURN ODCIConst.Success;
END ODCIGetInterfaces;
STATIC FUNCTION ODCIIndexCreate (ia sys.ODCIIndexInfo, parms VARCHAR2, env sys.ODCIEnv) RETURN NUMBER IS
BEGIN
RETURN ODCIConst.Success;
END ODCIIndexCreate;
STATIC FUNCTION ODCIIndexDrop(ia sys.ODCIIndexInfo, env sys.ODCIEnv) RETURN NUMBER IS
BEGIN
RETURN ODCIConst.Success;
END ODCIIndexDrop;
STATIC FUNCTION ODCIIndexAlter (
ia sys.ODCIIndexInfo,
parms IN OUT VARCHAR2,
altopt NUMBER,
env sys.ODCIEnv)
RETURN NUMBER IS
BEGIN
RETURN ODCIConst.Success;
END ODCIIndexAlter;
STATIC FUNCTION ODCIIndexUpdPartMetadata(
ia sys.ODCIIndexInfo,
palist sys.ODCIPartInfoList,
env sys.ODCIEnv)
RETURN NUMBER IS
BEGIN
RETURN ODCIConst.Success;
END ODCIIndexUpdPartMetadata;
STATIC FUNCTION ODCIIndexExchangePartition(
ia sys.ODCIIndexInfo,
ia1 sys.ODCIIndexInfo,
env sys.ODCIEnv)
RETURN NUMBER IS
BEGIN
RETURN ODCIConst.Success;
END ODCIIndexExchangePartition;
STATIC FUNCTION ODCIIndexInsert(
ia sys.ODCIIndexInfo,
ridlist sys.ODCIRidList,
newvallist sys.ODCINumberList,
env sys.ODCIEnv)
RETURN NUMBER IS
BEGIN
return ODCIConst.Success;
END;
STATIC FUNCTION ODCIIndexDelete(
ia SYS.ODCIIndexInfo,
rid VARCHAR2,
oldval number,
env SYS.ODCIEnv)
RETURN NUMBER IS
BEGIN
return ODCIConst.Success;
END;
STATIC FUNCTION ODCIIndexUpdate(
ia SYS.ODCIIndexInfo,
rid VARCHAR2,
oldval number,
newval number,
env SYS.ODCIEnv)
RETURN NUMBER AS
BEGIN
return ODCIConst.Success;
END;
STATIC FUNCTION ODCIIndexStart(
sctx IN OUT index_methods,
ia SYS.ODCIIndexInfo,
op SYS.ODCIPredInfo,
qi sys.ODCIQueryInfo,
strt number,
stop number,
cmpval number,
env SYS.ODCIEnv)
RETURN NUMBER AS
BEGIN
sctx := index_methods(1);
return ODCIConst.Success;
END;
MEMBER FUNCTION ODCIIndexFetch(
self IN OUT index_methods,
nrows NUMBER,
rids OUT SYS.ODCIridlist,
env SYS.ODCIEnv)
RETURN NUMBER AS
BEGIN
return ODCIConst.Success;
END;
MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER AS
BEGIN
return ODCIConst.Success;
END;
end;
Problem workaround:
--drop function test_eq_fun;
CREATE FUNCTION test_eq_fun(a number, b number) RETURN NUMBER AS
BEGIN
IF a = b then
RETURN 1;
ELSE
RETURN 0;
END IF;
END;
--drop operator test_eq;
CREATE OPERATOR test_eq
BINDING (number, number) RETURN NUMBER
USING test_eq_fun;
--drop indextype test_index_type;
CREATE INDEXTYPE test_index_type
FOR
test_eq(number, number)
USING index_methods
WITH ARRAY DML(number, sys.ODCINumberList)
WITH LOCAL RANGE PARTITION
WITH SYSTEM MANAGED STORAGE TABLES;
CREATE INDEXTYPE test_index_type
FOR
test_eq(number, number)
USING index_methods
WITH ARRAY DML
WITH LOCAL RANGE PARTITION
WITH SYSTEM MANAGED STORAGE TABLES;
--drop table test_table;
CREATE TABLE test_table (id NUMBER (19,0));
CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type;
insert into test_table values (1);I get single for 1 row and batch for 2 or more rows in the following simplified simulation.
SCOTT@orcl12c> DESC SYS.ODCINUMBERLIST
SYS.ODCINUMBERLIST VARRAY(32767) OF NUMBER
SCOTT@orcl12c> CREATE OR REPLACE TYPE index_methods AS OBJECT
2 (
3 step number,
4 STATIC FUNCTION ODCIGetInterfaces(ifclist OUT SYS.ODCIObjectList) RETURN NUMBER,
5 STATIC FUNCTION ODCIIndexCreate (ia SYS.ODCIIndexInfo, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER,
6 STATIC FUNCTION ODCIIndexAlter (ia sys.ODCIIndexInfo, parms IN OUT VARCHAR2, altopt number, env sys.ODCIEnv) RETURN NUMBER,
7 STATIC FUNCTION ODCIIndexDrop(ia SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
8 STATIC FUNCTION ODCIIndexExchangePartition(ia SYS.ODCIIndexInfo, ia1 SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
9 STATIC FUNCTION ODCIIndexUpdPartMetadata(ia sys.ODCIIndexInfo, palist sys.ODCIPartInfoList, env sys.ODCIEnv) RETURN NUMBER,
10 STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, rid in VARCHAR2, newval in NUMBER, env in SYS.ODCIEnv) RETURN NUMBER,
11 STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList, newvallist in your_type, env in SYS.ODCIEnv) RETURN NUMBER,
12 STATIC FUNCTION ODCIIndexDelete(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, env SYS.ODCIEnv) RETURN NUMBER,
13 STATIC FUNCTION ODCIIndexUpdate(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, newval number, env SYS.ODCIEnv) RETURN NUMBER,
14 STATIC FUNCTION ODCIIndexStart(sctx IN OUT index_methods, ia SYS.ODCIIndexInfo,
15 op SYS.ODCIPredInfo, qi sys.ODCIQueryInfo, strt number, stop number, cmpval number, env SYS.ODCIEnv) RETURN NUMBER,
16 MEMBER FUNCTION ODCIIndexFetch(self IN OUT index_methods, nrows NUMBER, rids OUT SYS.ODCIridlist, env SYS.ODCIEnv) RETURN NUMBER,
17 MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER
18 );
19 /
Type created.
SCOTT@orcl12c> CREATE OR REPLACE TYPE BODY index_methods IS
2 STATIC FUNCTION ODCIGetInterfaces(ifclist OUT sys.ODCIObjectList) RETURN NUMBER IS
3 BEGIN
4 ifclist := sys.ODCIObjectList(sys.ODCIObject('SYS','ODCIINDEX2'));
5 RETURN ODCIConst.Success;
6 END ODCIGetInterfaces;
7
8 STATIC FUNCTION ODCIIndexCreate (ia sys.ODCIIndexInfo, parms VARCHAR2, env sys.ODCIEnv) RETURN NUMBER IS
9 BEGIN
10 RETURN ODCIConst.Success;
11 END ODCIIndexCreate;
12
13 STATIC FUNCTION ODCIIndexDrop(ia sys.ODCIIndexInfo, env sys.ODCIEnv) RETURN NUMBER IS
14 BEGIN
15 RETURN ODCIConst.Success;
16 END ODCIIndexDrop;
17
18 STATIC FUNCTION ODCIIndexAlter (
19 ia sys.ODCIIndexInfo,
20 parms IN OUT VARCHAR2,
21 altopt NUMBER,
22 env sys.ODCIEnv)
23 RETURN NUMBER IS
24 BEGIN
25 RETURN ODCIConst.Success;
26 END ODCIIndexAlter;
27
28 STATIC FUNCTION ODCIIndexUpdPartMetadata(
29 ia sys.ODCIIndexInfo,
30 palist sys.ODCIPartInfoList,
31 env sys.ODCIEnv)
32 RETURN NUMBER IS
33 BEGIN
34 RETURN ODCIConst.Success;
35 END ODCIIndexUpdPartMetadata;
36
37 STATIC FUNCTION ODCIIndexExchangePartition(
38 ia sys.ODCIIndexInfo,
39 ia1 sys.ODCIIndexInfo,
40 env sys.ODCIEnv)
41 RETURN NUMBER IS
42 BEGIN
43 RETURN ODCIConst.Success;
44 END ODCIIndexExchangePartition;
45
46 STATIC FUNCTION ODCIIndexInsert(
47 ia sys.ODCIIndexInfo,
48 rid VARCHAR2,
49 newval NUMBER,
50 env sys.ODCIEnv)
51 RETURN NUMBER IS
52 BEGIN
53 dbms_output.put_line ('single');
54 return ODCIConst.Success;
55 END;
56
57 STATIC FUNCTION ODCIIndexInsert(
58 ia sys.ODCIIndexInfo,
59 ridlist sys.ODCIRidList,
60 newvallist your_type,
61 env sys.ODCIEnv)
62 RETURN NUMBER IS
63 BEGIN
64 dbms_output.put_line ('batch');
65 return ODCIConst.Success;
66 END;
67
68 STATIC FUNCTION ODCIIndexDelete(
69 ia SYS.ODCIIndexInfo,
70 rid VARCHAR2,
71 oldval number,
72 env SYS.ODCIEnv)
73 RETURN NUMBER IS
74 BEGIN
75 return ODCIConst.Success;
76 END;
77
78 STATIC FUNCTION ODCIIndexUpdate(
79 ia SYS.ODCIIndexInfo,
80 rid VARCHAR2,
81 oldval number,
82 newval number,
83 env SYS.ODCIEnv)
84 RETURN NUMBER AS
85 BEGIN
86 return ODCIConst.Success;
87 END;
88
89 STATIC FUNCTION ODCIIndexStart(
90 sctx IN OUT index_methods,
91 ia SYS.ODCIIndexInfo,
92 op SYS.ODCIPredInfo,
93 qi sys.ODCIQueryInfo,
94 strt number,
95 stop number,
96 cmpval number,
97 env SYS.ODCIEnv)
98 RETURN NUMBER AS
99 BEGIN
100 sctx := index_methods(1);
101 return ODCIConst.Success;
102 END;
103
104 MEMBER FUNCTION ODCIIndexFetch(
105 self IN OUT index_methods,
106 nrows NUMBER,
107 rids OUT SYS.ODCIridlist,
108 env SYS.ODCIEnv)
109 RETURN NUMBER AS
110 BEGIN
111 return ODCIConst.Success;
112 END;
113
114 MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER AS
115 BEGIN
116 return ODCIConst.Success;
117 END;
118 end;
119 /
Type body created.
SCOTT@orcl12c> CREATE FUNCTION test_eq_fun(a number, b number) RETURN NUMBER AS
2 BEGIN
3 IF a = b then
4 RETURN 1;
5 ELSE
6 RETURN 0;
7 END IF;
8 END;
9 /
Function created.
SCOTT@orcl12c> CREATE OPERATOR test_eq
2 BINDING (number, number) RETURN NUMBER
3 USING test_eq_fun
4 /
Operator created.
SCOTT@orcl12c> CREATE INDEXTYPE test_index_type
2 FOR
3 test_eq(number, number)
4 USING index_methods
5 WITH ARRAY DML(number, your_type)
6 WITH LOCAL RANGE PARTITION
7 WITH SYSTEM MANAGED STORAGE TABLES
8 /
Indextype created.
SCOTT@orcl12c> CREATE TABLE test_table (id NUMBER (19,0))
2 /
Table created.
SCOTT@orcl12c> CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type
2 /
Index created.
SCOTT@orcl12c> insert into test_table values (1)
2 /
single
1 row created.
SCOTT@orcl12c> insert into test_table
2 select 2 from dual union all
3 select 3 from dual
4 /
batch
2 rows created.
SCOTT@orcl12c> insert into test_table select deptno from dept
2 /
batch
4 rows created.
SCOTT@orcl12c> insert into test_table select object_id from user_objects
2 /
batch
34 rows created.
SCOTT@orcl12c> -
When/How to use - "search" parameter type in parameter like other types.
We recently upgraded BI Publisher to 10.1.3.4. I saw new parameter type "search" in parameter section, when creating report. whats the use of it? How to use it ? like other parameter type Text, Menu,Hidden, Date.
I couldn't find any help or release notes on this !
Thanks
AyapsI started looking into this parameter type when our drop-down for customer numbers went from 13,000 (manageable) to 45,000 (completely unmanageable).
I imagine this is supposed to mimic the effects of a "Long List" type LOV in Oracle Applications (as I had inquired about in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=895521&stqc=true|Large List of Values (LoV) hangs. Is there an equivalent for a long list?]), but performance-wise, "Search" does not seem to be any more efficient that using the "Menu" type LOV. Even with the help of having a partial string with a wildcard to match, the "Search" still takes too long to pull up to be of any use to us. -
Alert is not working for mutiple times for list "select" function in sapui5 XML view
Hello All,
I am trying to open an alert for multiple times for list "select" function. But it's opening for only one time .
Please find code below.
View Part
<List id="contactedit" select="somefunction">
<CustomListItem id="custom1" type="Inactive" >
<content>
<Label text="this is label" />
</content>
</CustomListItem>
</List>
Controller Part
somefunction: function(oEvent){
alert("this is an alert");
Thanks in Advance
D.MohanbabuI think I saw this question in stack overflow. And I answered it :-)
I believe that it is because you can only one item in the list and once the item is selected, re-selecting it will not fire the event.
Try adding more items to the list and select different items.
Thanks
-D -
CVI IDE: Is it possible to see list of functions for faster navigation?
Colleagues,
Very simple question about CVI IDE.
Is it possible to see whole list of functions for fast and convenient navigation, like in Micro$oft Visual Studio:
When I have C code with more than 20-30 functions and 2000+ lines - its a very inconvenient to scroll up and down every time...
I guess this feature should present in CVI, or I missing something?
How you working with relative large projects in CVI?
Thank you in advance,
Andrey.CVI offers the Source Code Browser, which shows informations about files, functions, variables, data types and macros in your code. The code browser can be accessed in several ways: the easiest is to position over an element in the code and press Ctrl+F1: the lower part of the workbench will host the Source Code Browser area (though you can lately release this window to position it wherever you find it useful). There are several other ways to access these informations: I suggest you to look in the online help, topic Using LabWindows/CVI >> Writing Source Code >> Browsing Source Code
CVI has several other ways of navigating in your application:
Select a panel, menu or control callback and press Ctrl+Shift+U to go to the object in the UIR editor
Right-click on an element in the UIR editor to go to its callback (if any)
Select a function call in the code editor and press Ctrl+I to go to the function source
Select a filename and press Ctrl+U to open it in an editor window
... and others I don't remember now!
Message Edited by Roberto Bozzolo on 05-07-2010 10:12 AM
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Hi, all:
I'm trying to configure TrendMicro IOS content filtering. I have this working on a separate box, running 15.1.
On this particular testbed, I have a 2900 running:
System image file is "flash0:c2900-universalk9-mz.SPA.152-3.T1.bin"
And the following licensing:
Technology Package License Information for Module:'c2900'
Technology Technology-package Technology-package
Current Type Next reboot
ipbase ipbasek9 Permanent ipbasek9
security securityk9 Permanent securityk9
uc uck9 Permanent uck9
data datak9 Permanent datak9
Configuration register is 0x2102
CUBE_GOLD_MEX#show ip trm subscription status
Package Name: Security & Productivity (Trial)
Status: Active
Status Update Time: 18:02:51 CST Mon Jul 23 2012
Expiration-Date: Mon Aug 20 02:00:00 2012
Last Req Status: Processed response successfully
Last Req Sent Time: 18:02:51 CST Mon Jul 23 2012
CUBE_GOLD_MEX#
Also, I have the following config lines on it:
ip host trps.trendmicro.com 216.104.8.100
ip name-server 4.2.2.2
ip cef
multilink bundle-name authenticated
parameter-map type urlfpolicy trend tm-pmap
allow-mode on
[snip]
parameter-map type trend-global trend-glob-map
class-map type inspect match-all http-imap
match protocol http
class-map type urlfilter trend match-any drop-category
match url category Abortion
match url category Activist-Groups
match url category Adult-Mature-Content
match url reputation ADWARE
match url reputation DIALER
match url reputation DISEASE-VECTOR
match url reputation HACKING
match url reputation PASSWORD-CRACKING-APPLICATIONS
match url reputation PHISHING
match url reputation POTENTIALLY-MALICIOUS-SOFTWARE
match url reputation SPYWARE
match url reputation VIRUS-ACCOMPLICE
policy-map type inspect urlfilter trend-policy
class type urlfilter trend drop-category
I have not been able to get to the good part of configuring the ZBF.
I've looked over several configuration examples and can't figure out what I'm doing wrong, since I'm not able to see the command 'parameter-map' under the 'policy-map urlfiltering'
XXXXXX(config)#policy-map type inspect urlfilter trend-policy
XXXXXX(config-pmap)#?
Policy-map configuration commands:
class policy criteria
description Policy-Map description
exit Exit from policy-map configuration mode
no Negate or set default values of a command
XXXXXX(config-pmap)#
I thought it might be an issue with version 15.2.3, but according to configuration guides, commands are the same.
Can anyone provide some assistance?
TIA.
c.Hi Carlos,
I am having the same problem. I have seen a few diffenent configuration examples and they all show adding the "parameter type urlfpolicy trend parm-map-name" command but it doesn't exist, at least in 15.2(3)T1 and I see it listed in the the IOS documentation for 15.2. Maybe they forgot it :-)
I guess I will open a TAC case as I do not want to downgrade...
I will keep you posted if I find the answer.
Regards,
Troy -
HR Create Standalone Query Integrator - LOV as parameter type?
Hi
Our customer wants to download data from a view with filters on various fields. We accomplished this using a download integrator and created restrictions via Standalone Query with various where clause parameters to the view(using HR Create Standalone Query Integrator). While this addressed customer's requirement they are seeing lot of users entering wrong data for the parameter value and causing bad SQLs hitting the database. Customer wants to make sure they dont let end users enter the wrong values in the run time parameter and requesting to make the parameter prompt value to be a LOV type where they are forced to choose one of the valid value.
Example:
Integrator Name - AP_INVOICE
SQL Where Clause – where invoice_type=$PARAM$.invoice_type
1st Parameter Name – invoice_type
1st Parameter Type – Varchar2
1st Parameter Prompt– Invoice Type Equals
Customer wants this Invoice type parameter values to be shown in a drop down list so that end user is forced to pick the valid value and download the data. How to accomplish this? Appreciate your guidance.
Thank you.DECLARE
ln_number NUMBER := 1;
BEGIN
BNE_PARAM_DEFNS_PKG.UPDATE_ROW (
X_APPLICATION_ID => 800,
X_PARAM_DEFN_CODE =>'PER_BUS_GRP_ID',
X_OBJECT_VERSION_NUMBER => ln_number,
X_PARAM_NAME => 'PER:BUS_GRP_ID',
X_PARAM_SOURCE =>'HR:Download',
X_PARAM_CATEGORY => 5,
X_DATATYPE =>1,
X_ATTRIBUTE_APP_ID => NULL,
X_ATTRIBUTE_CODE => NULL,
X_PARAM_RESOLVER => NULL,
X_DEFAULT_REQUIRED_FLAG => 'N',
X_DEFAULT_VISIBLE_FLAG =>'Y',-- changed from 'Y' to 'N'
X_DEFAULT_USER_MODIFYABLE_FLAG =>'Y',
X_DEFAULT_DATE => NULL,
X_DEFAULT_NUMBER => NULL,
X_DEFAULT_BOOLEAN_FLAG => NULL,
X_DEFAULT_FORMULA => NULL,
X_VAL_TYPE => 2,
X_VAL_VALUE =>'XXC_HR_ALL_BG',
X_MAX_SIZE => 240,
X_DISPLAY_TYPE => 3,
X_DISPLAY_STYLE =>1,
X_DISPLAY_SIZE => 240,
X_HELP_URL => NULL,
X_FORMAT_MASK => NULL,
X_USER_NAME => 'APPS',
X_DEFAULT_STRING => NULL,
X_DEFAULT_STRING_TRANS_FLAG =>NULL,
X_DEFAULT_DESC => NULL,
X_PROMPT_LEFT => 'Business Group Name',
X_PROMPT_ABOVE => 'Business Group Name',
X_USER_TIP => 'Enter Business Group Name',
X_ACCESS_KEY => NULL,
X_LAST_UPDATE_DATE => SYSDATE,
X_LAST_UPDATED_BY => -1,
X_LAST_UPDATE_LOGIN => -1
dbms_output.put_line('Value of Object Version Number is : '|| ln_number);
exception
when others then
dbms_output.put_line(SQLERRM);
end;Edited by: 936671 on Jul 4, 2012 10:51 AM
Maybe you are looking for
-
Regarding the Java version for installation of ECC6.0
Hi frnds When i tried to install ECC6.0 abap + java system with version j2sdk-1_4_2_13-windows-i586-p.exe, igot stuck up with errors.My dear friends please suggest me which version should i use and from where to down load.Please help me out. From Si
-
I have a few BPEL sharing the same jar files. I would like to deploy just a single copy on the BPEL server instead of copying all the jars inside the bpel_inf\lib folder inside each project. Now i have a shared lib folder and i added the jar files, a
-
Double Tapping causes my mouse pointer to shift or move.
I am new to Mac. I got a WHITE macbook 13" about three weeks ago and while I am learning to switch from PC to Mac I found out about the great options the trackpad can offer to make my switch easier, BUT I have noticed "and this is very annoying to me
-
Is there a "master page" in contribute?
I created a website in a basic software program, and now edit/manage it using Adobe Contribute. I want to update the side bar table with all the links for the site, and this obviously needs to take affect on ALL pages; not just one. Is there a "maste
-
How to expand hierarchy at one shot in WAD.
HI gurus I have a hierarchy in WAD with 10 nodes.To expand I have to click each note which takes some time to expand .The user wants to expand all node in one click. Is there any way to incorporate in WAD . Thanks Rgds Pradeep