Procedur call with a button
Hi,
i have create a pl/sql procedur like
create or replace procedure MY_PROC (p_NAME IN VARCHAR2) as
Now i have a button (the_button) in a region an a select list (s_List/ P123_Name)
I want to call the procedur, but i don't now how
I try: Button condition typ PL/SQL Expression
EXPRESSION 1
BEGIN
MY_PROC (:P123_name);
END;
but the code ist not valid.
can everyone explain me, how i can call this procedur?
THX
René
Hi,
What that procedure suppose to do?
I assume your button should submit page.
Then call procedure in after submit process.
Button condition, is for conditionally display button.
Not for executing procedures.
Regards,
Jari
Similar Messages
-
Stored Procedure Call with only Input Parameter
Hi, The Example at Oracle Toplink Developer's Guide, Volume 5 uses an output param named IS_VALID. How Can I Call a Stored Procedure that has only Input Param ? If I don't use an Ouput Param Toplink throw the following Exception:
*Excepción [TOPLINK-4002]* (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070620)): oracle.toplink.exceptions.DatabaseException Excepción Interna: java.sql.SQLException: ORA-00900: invalid SQL statement
Here's the Sample Code Depicted at the Guide:*
Example 98–48 Stored Procedure Call with an Output Parameter
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("CHECK_VALID_POSTAL_CODE");
call.addNamedArgument("POSTAL_CODE");
call.addNamedOutputArgument(
"IS_VALID", // procedure parameter name
"IS_VALID", // out argument field name
Integer.class // Java type corresponding to type returned by procedure
ValueReadQuery query = new ValueReadQuery();
query.setCall(call);
query.addArgument("POSTAL_CODE");
Vector parameters = new Vector();
parameters.addElement("L5J1H5");
Number isValid = (Number) session.executeQuery(query,parameters);
Here's my code
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("MYSTOREDPROCEDURE");
call.addNamedArgument("INPUTPARAM1");
call.addNamedArgument("INPUTPARAM2");
call.addNamedArgument("INPUTPARAM3");
call.addNamedArgument("INPUTPARAM4");
call.addNamedArgument("INPUTPARAM5");
call.addNamedArgument("INPUTPARAM6");
ValueReadQuery query = new ValueReadQuery();
query.setCall(call);
query.addArgument("INPUTPARAM1");
query.addArgument("INPUTPARAM2");
query.addArgument("INPUTPARAM3");
query.addArgument("INPUTPARAM4");
query.addArgument("INPUTPARAM5");
query.addArgument("INPUTPARAM6");
Vector parameters = new Vector();
parameters.addElement("INPUTVALUE1");
parameters.addElement("INPUTVALUE2");
parameters.addElement("INPUTVALUE3");
parameters.addElement("INPUTVALUE4");
parameters.addElement("INPUTVALUE5");
parameters.addElement("INPUTVALUE6");
uow.executeQuery(query,parameters);
Regards,
ManuelYou need to use a DataModifyQuery as your query does not return anything.
James : http://www.eclipselink.org -
DBMS_JOB.SUBMIT ( procedure call with parameter )
Hello,
I am trying to call procedure with input parameter using dbms_job.SUBMIT and it gives me the value of p_email must be declared.
declare
my_job number;
p_email varchar2(50) := 'abc';
my_pro varchar2(100) := 'BEGIN my_pkg.my_proc(' || p_email ||'); END;';
BEGIN
DBMS_JOB.SUBMIT(JOB => MY_JOB,WHAT => my_pro);
END;
if anybody knows how to solve please let me know ASAP.
TIASQL> set serveroutput on;
SQL> declare
2 my_job number;
3 p_email varchar2(50) := 'abc';
4 my_pro varchar2(100) := 'BEGIN my_pkg.my_proc(' || p_email ||'); END;'
5 BEGIN
6 dbms_output.put_line(my_pro);
7 END;
8 /
BEGIN my_pkg.my_proc(abc); END;
PL/SQL procedure successfully completed.i think i should also be enclosed in single quote. see this example below.
SQL> declare
2 my_job number;
3 p_email varchar2(50) := 'abc';
4 my_pro varchar2(100) := 'BEGIN my_pkg.my_proc(' ||''''|| p_email||'''' ||'); END;';
5 BEGIN
6 dbms_output.put_line(my_pro);
7 END;
8 /
BEGIN my_pkg.my_proc('abc'); END;
PL/SQL procedure successfully completed.
SQL>
your job would look like:declare
my_job number;
p_email varchar2(50) := 'abc';
my_pro varchar2(100) := 'BEGIN my_pkg.my_proc(' ||''''|| p_email||'''' ||'); END;';
BEGIN
DBMS_JOB.SUBMIT(JOB => MY_JOB,WHAT => my_pro);
END; -
Stored Procedure Call with Connection Pools
Hi everybody,
I have changed my Database-Connection to Connection Pooling.
No I try to call a stored procedure like this:
Connection connection;
CallableStatement callStmt;
Integer sp_result;
//--- Set callable stored procedure
String call = "{?=call myStoredProcedure(?,?,?)}";
try {
if( connection != null ) {
callStmt = connection.prepareCall( call );
callStmt.registerOutParameter( 1, java.sql.Types.INTEGER );
callStmt.setInt( 2, 3 );
callStmt.setString( 3, plz );
callStmt.setString( 4, ort );
callStmt.execute( call );
sp_result = new Integer( callStmt.getInt(1) );
callStmt.close();
result = sp_result.intValue();
} else {
log.error( "Connection = null" );
} catch( SQLException ex ) {
log.error( ex.toString() );
ServletUtils.forwardRequest(this, request, response,
"/error.jsp", "errorMsg", ex.toString() );
Without Connection Pooling, my Connection is of
'weblogic.jdbc.mssqlserver4.MicrosoftConnection'
With Connection Pooling my Connection is of
'weblogic.jdbc2.rmi.SerialConnection'
And now, the stored procedure can't be found anymore.
There comes an SQLException:
Gespeicherte Prozedur 'myStoredProcedure' konnte nicht gefunden werden.
Severity 16, State 62, Procedure 'myDBServer null', Line 5
One possibility is that the SerialConnection can't call the stored procedure
like the Microsoft-specific Connection (I use MS-SQL-Server)
Another is that the call have to be another stucture.
I would be pleased if somebody is expirienced in this behaviour.
Thousand thanx,
Hammer.You need to use a DataModifyQuery as your query does not return anything.
James : http://www.eclipselink.org -
Stored procedure call with REF CURSOR from JDBC
How can I call a SP with a REF CURSOR OUT parameter from JDBC?
This is a breeze.
CallableStatement oraCall = oraConn.prepareCall("BEGIN PKG_SOMETHING.RETURNS_A_SP(?);END;");
oraCall.registerOutParameter(1,oracle.jdbc.driver.OracleTypes.CURSOR);
oraCall.execute();
ResultSet rsServList = (ResultSet) oraCall.getObject(1);
... use ResultSet ...
rsServList.close();
oraCall.close();
slag -
Stop ending call with power button
Is there any way I can turn this feature off?
No, there is not. It is a firmware feature of the iPhone and there is no setting to change it.
-
I'm fairly new to action script and struggling to get a
wiimote to trigger a flash scene.
Need the scene to be triggered by the IR and B button
together.
I currently have this piece of script which triggers the
scene but only through the IR.
if (bButtonPressed)(myWiimote.ir.x1 >=0.1);
gotoAndStop(10);
Can anyone help me please.
Cheers
TomI suggest you move the procedure call from the button's pl/sql block to an explicitly defined WHEN-BUTTON-PRESSED event. Then Designer will not generate any message handling, so you can write your own.
In your WHEN-BUTTON-PRESSED code block, put something like...
BEGIN
procedure_name;
IF NOT form_success THEN
qms$errors.show_message('XXX-00016',p_param0='procedure_name');
END IF;
END;
For more information on qms$errors.show_message, see the Headstart User Guide, pg 16-6 through 16-7.
On another subject, you reported about a month ago with using qms$menu_call_form. I was wondering if you were able to reproduce this problem with the Headstart Demo Application, or have any more information about when it happens. If so, can you email me at [email protected]
Regards,
Lauri -
Hi,
I have an Oracle Stored Procedure that I must be calling. The procedure takes two IN parameters, and returns a CHAR(1000) string, not via the OUT parameter, but as normal return.
I have read articles about how to make Procedure Calls with OUT parameters, but didnt find any on my case. I have tried several options but still get parameter binding errors.
What I am trying right now is this:
If anyone
<b>======== code ==============</b>
SQLParameter[] params = new SQLParameter[2];
// Construct three objects corresponding to initial values
Object objMsisdn = new String("9656364550");
Object objUsername = new String("abc");
String output;
// prepare the oracle procedure parameters
params[0] = new SQLParameter(objMsisdn, Types.VARCHAR, SQLParameter.IN);
params[1] = new SQLParameter(objUsername, Types.VARCHAR, SQLParameter.IN);
try{
output = custDetDB.getCustDetails(params);
<b>========================================</b>
Java DB Control:
<b>========================================</b>
* @jc:sql statement="{call www_custdet(?,?)}"
String getCustDetails(SQLParameter[] params) throws SQLException;
Right now I am getting "Not All Variables Bound Error". I tried to have all IN & OUT parameters sent as SQLParameter before but that didnt work either.
Any hints?Bashar Abdullah wrote:
Hi,
> I have an Oracle Stored Procedure that I must be calling. The procedure takes two IN parameters, and returns a CHAR(1000) string, not via the OUT parameter, but as normal return.
As far as I know, it is impossible for an Oracle
stored procedure to return anything except
as output parameters. Show the text of the procedure,
and tell us what JDBC driver you're using.
Joe
I have read articles about how to make Procedure Calls with OUT parameters, but didnt find any on my case. I have tried several options but still get parameter binding errors.
> What I am trying right now is this:
If anyone
> <b>======== code ==============</b>
> SQLParameter[] params = new SQLParameter[2];
>
// Construct three objects corresponding to initial values
> Object objMsisdn = new String("9656364550");
> Object objUsername = new String("abc");
> String output;
>
> // prepare the oracle procedure parameters
> params[0] = new SQLParameter(objMsisdn, Types.VARCHAR, SQLParameter.IN);
> params[1] = new SQLParameter(objUsername, Types.VARCHAR, SQLParameter.IN);
>
try{
> output = custDetDB.getCustDetails(params);
> <b>========================================</b>
> Java DB Control:
> <b>========================================</b>
> /**
> * @jc:sql statement="{call www_custdet(?,?)}"
> */
> String getCustDetails(SQLParameter[] params) throws SQLException;
>
> Right now I am getting "Not All Variables Bound Error". I tried to have all IN & OUT parameters sent as SQLParameter before but that didnt work either.
>
Any hints? -
Regional settings influences jdbc stored procedure calls?
Hi,
We have a strange problem: we use a jdbc test client
that does a simple stored procedure call with one
input parameter (integer) and one output parameter
(integer). Like:
"? = callprocedure(?)" . The database resides on a different server.
The problem is: this only works when we use "netherlands" regional setting on the windows 2000 machine that
java client program runs on. If we switch to
"english (united states)" the call gives other results
in the output parameter / returns an error code.
Does this have something to do with the Locale of the
virtual machine? Or do I have to do something with
NLS_LANG to eliminate the behaviour that is dependent on
the windows regional settings? Please help!
Thanks,
Michel Schudel
We use the Oracle JDBC thin driver, latest version.
(archive: classes12.zip)Ok, here it is. Basically, I first call a stored procedure called SETPARAM which receives two Strings:
a parameter name and a a parameter value. After that, I
call a procedure called RUNSQLKIT without any input parameters. The output parameter is an integer that indicates the number of "cells" in the output message. After that, I start to retrieve the cells but that is not important here. What happens is: with Dutch regional settings, the number of cells is normal (387) but with
US settings, the number of cells is -1 (indicates an error.) Why? I use no dates or floating point values as
input/output!
Jvm version is 1.3.1_08, oracle driver is 8.1.7
(Oracle 8i) thin jdbc driver. Oracle runs on AIX.
conn = m_dataSource.getConnection();
// Setup the input params
stmtInput = conn.prepareCall("BEGIN Pck_Sqlmast.setparam(?,?); END;");
for (final Iterator iter = m_kitParameterNames.iterator(); iter.hasNext();) {
final String sName = (String) iter.next();
final String sValue = input.getParameter(sName);
if (sValue != null) {
stmtInput.setString(1, sName);
stmtInput.setString(2, sValue);
stmtInput.executeUpdate();
// Call the kit
stmtRun = conn.prepareCall("BEGIN ? := Pck_Sqlmast.runsqlkit(?); END;");
stmtRun.registerOutParameter(1, Types.INTEGER);
stmtRun.setString(2, m_kitName);
stmtRun.executeUpdate();
final int iCells = stmtRun.getInt(1);
Hi Michel,
Perhaps you would care to post some more information
including:
1. Entire error message and stack trace you are
getting.
2. The part of your java code where the error
occurs.
3. Java version you are using.
4. Oracle database version you are using.
5. Platform on which Oracle database is running.
Good Luck,
Avi. -
Is there a way to answer the 5c without swiping? It really is a pain and hard to do at times one handed. Maybe allow favorites to be answered with a click of the home button or possibly all calls with a home button push. First smart phone I have owned and the old flip phone was much easier to answer.....just press one button.
Is there a way to answer the 5c without swiping? It really is a pain and hard to do at times one handed. Maybe allow favorites to be answered with a click of the home button or possibly all calls with a home button push. First smart phone I have owned and the old flip phone was much easier to answer.....just press one button.
-
I'm replicating between two servers in two sites (Server A - Server 2012 R2 STD, Server B - Server 2008 R2) over a VPN (Sonicwall Firewall). Though the initial replication seems to be
happening it is very slow (the folder in question is less than 3GB). I'm seeing these in the event viewer every few minutes:
The DFS Replication service is stopping communication with partner PPIFTC for replication group FTC due to an error. The service will retry the connection periodically.
Additional Information:
Error: 1726 (The remote procedure call failed.)
and then....
The DFS Replication service successfully established an inbound connection with partner PPIFTC for replication group FTC.
Here are all my troubleshooting steps (keep in mind that our VPN is going through a SonicWall <--I increased the TCP timeout to 24 hours):
-Increased TCP Timeout to 24 hours
-Added the following values on both sending and receiving members and rebooted server
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value =DisableTaskOffload
Type = DWORD
Data = 1
Value =EnableTCPChimney
Type = DWORD
Data = 0
Value =EnableTCPA
Type = DWORD
Data = 0
Value =EnableRSS
Type = DWORD
Data = 0
---------------------------------more troubleshooting--------------------------
-Disabled AntiVirus on both members
-Made sure DFSR TCP ports 135 & 5722 are open
-Installed all hotfixes for 2008 R2 (http://support.microsoft.com/kb/968429) and rebooted
-Ran NETSTAT –ANOBP TCP and the DFS executable results are listed below:
Sending Member:
[DFSRs.exe]
TCP 10.x.x.x:53 0.0.0.0:0
LISTENING 1692
[DFSRs.exe]
TCP 10.x.x.x:54669
10.x.x.x:5722 TIME_WAIT 0
TCP 10.x.x.x:54673
10.x.x.x:5722 ESTABLISHED 1656
[DFSRs.exe]
TCP 10.x.x.x:64773
10.x.x.x:389 ESTABLISHED 1692
[DFSRs.exe]
TCP 10.x.x.x:64787
10.x.x.x:389 ESTABLISHED 1656
[DFSRs.exe]
TCP 10.x.x.x:64795
10.x.x.x:389 ESTABLISHED 2104
Receiving Member:
[DFSRs.exe]
TCP 10.x.x.x:56683
10.x.x.x:389 ESTABLISHED 7472
[DFSRs.exe]
TCP 10.x.x.x:57625
10.x.x.x:54886 ESTABLISHED 2808
[DFSRs.exe]
TCP 10.x.x.x:61759
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61760
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61763
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61764
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61770
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61771
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61774
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61775
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61776
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61777
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61778
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61779
10.x.x.x:57625 TIME_WAIT 0
TCP 10.x.x.x:61784
10.x.x.x:52757 ESTABLISHED 7472
[DFSRs.exe]
TCP 10.x.x.x:63661
10.x.x.x:63781 ESTABLISHED 4880
------------------------------more troubleshooting--------------------------
-Increased Staging to 32GB
-Opened the ADSIedit.msc console to verify the "Authenticated Users" is set with the default READ permission on the following object:
a. The computer object of the DFS server
b. The DFSR-LocalSettings object under the DFS server computer object
-Ran
ping <var>10.x.x.x</var> -f -l 1472 and got replies back from both servers
-AD replication is successful on all partners
-Nslookup is working so DNS is working
-Updated NIC drivers on both servers
- I ran the following to set the Primary Member:
dfsradmin Membership Set /RGName:<replication group name> /RFName:<replicated folder name> /MemName:<primary member> /IsPrimary:True
Then Dfsrdiag Pollad /Member:<member name>
I'm seeing these errors in the dfsr logs:
20141014 19:28:17.746 9116 SRTR 957 [WARN] SERVER_EstablishSession Failed to establish a replicated folder session. connId:{45C8C309-4EDD-459A-A0BB-4C5FACD97D44} csId:{7AC7917F-F96F-411B-A4D8-6BB303B3C813}
Error:
+ [Error:9051(0x235b) UpstreamTransport::EstablishSession upstreamtransport.cpp:808 9116 C The content set is not ready]
+ [Error:9051(0x235b) OutConnection::EstablishSession outconnection.cpp:532 9116 C The content set is not ready]
+ [Error:9051(0x235b) OutConnection::EstablishSession outconnection.cpp:471 9116 C The content set is not ready]
---------------------------------------more troubleshooting-----------------------------
I've done a lot of research on the Internet and most of it is pointing to the same stuff I've tried. Does anyone have any other suggestions? Maybe I need to look somewhere
else on the server side or firewall side?
I tried replicating from a 2012 R2 server to another 2012 server and am getting the same events in the event log so maybe it's not a server issue.
Some other things I'm wondering:
-Could it be the speed of the NICs? Server A is a 2012 Server that has Hyper-V installed. NIC teaming was initially setup and since Hyper-V is installed the NIC is a "vEthernet
(Microsoft Network Adapter Multiplexor Driver Virtual Switch) running at a speed of 10.0Gbps whereas Server B is running a single NIC at 1.0Gbps
-Could occasional ping timeout's cause the issue? From time to time I get a timeout but it's not as often as the events I'm seeing. I'm getting 53ms pings. The folder
is only 3 GB so it shouldn't take that long to replicate but it's been days. The schedule I have set for replication is mostly all day except for our backup times which start at 11pm-5am. Throughout the rest of the time I have it set anywhere from
4Mbps to 64 Kbps. Server A is on a 5mb circuit and Server B is on a 10mb circuit.I'm seeing the same errors, all servers are running 2008 R2 x64. Across multiple sites, VPN is steady and reliably.
185 events from 12:28:21 to 12:49:25
Events are for all five servers (one per office, five total offices, no two in the same city, across three states).
Events are not limited to one replication group. I have quite a few replication groups, so I don't know for sure but I'm running under the reasonable assumption that none are spared.
Reminder from original post (and also, yes, same for me), the error is: Error: 1726 (The remote procedure call failed.)
Some way to figure out what code triggers an Event ID 5014, and what code therein specifies an Error 1726, would extremely helpful. Trying random command line/registry changes on live servers is exceptionally unappealing.
Side note, 1726 is referenced here:
https://support.microsoft.com/kb/976442?wa=wsignin1.0
But it says, "This RPC connection problem may be caused by an unstable WAN connection." I don't believe this is the case for my system.
It also says...
For most RPC connection problems, the DFS Replication service will try to obtain the files again without logging a warning or an error in the DFS Replication log. You can capture the network trace to determine whether the cause of the problem is at the network
layer. To examine the TCP ports that the DFS Replication service is using on replication partners, run the following command in a
Command Prompt window:
NETSTAT –ANOBP TCP
This returns all open TCP connections. The connections in question are "DFSRs.exe", which the command won't let you filter for.
Instead, I used the NETSTAT command as advertised, dumping output to info.txt:
NETSTAT -ANOBP TCP >> X:\info.txt
Then I opened Excel and manually opened the .TXT for the open wizard. I chose fixed-width fields based on the first row for each result, and then added a column:
=IF(A3="Can not", "Can not obtain ownership information", IF(LEFT(A3,1) = "[", A3&B3&C3, ""))
Dragging this down through the entire file let me see that row (Row F) as the file name. Some anomalies were present but none impacted DFSrs.exe results.
Finally, you can sort/filter (I sorted because I like being able to see everything, should I choose to) to get just the results you need, with the partial rows removed from the result set, or bumped to the end.
My server had 125 connections open.
That is a staggering number of connections to review, and I feel like I'm looking for a needle in a haystack.
I'll see if I can find anything useful out, but a better solution would be most wonderful. -
I've been trying to call a stored procedure through Entity Framework and WCF Data Services (OData). It returns an entity not a complex type. Following walkthroughs found all over the web, I came up with this code inside my service:
[WebGet]
public IQueryable<Entity> GetEntitiesByParameterId(int parameterId)
return CurrentDataSource.GetEntitiesByParameterId(parameterId).AsQueryable();
Calling the proc this way: ~WcfService.svc/GetEntitiesByParameterId?parameterId=1 executes
the stored procedure and returns entities that should be returned. No problem there.
Everything works well until I try to use $select OData option ie. ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name.
Upon debugging, the method above runs without any error but it returns an Operation could destabilize the runtime error upon reaching the
client. After so much research, apparently it is a very general error pointing to a lot of different causes. I haven't found one that really matches my particular problem. Closest are
http://stackoverflow.com/questions/378895/operation-could-destabilize-the-runtime
https://social.msdn.microsoft.com/Forums/en-US/d2fb4767-dc09-4879-a62a-5b2ce96c4465/for-some-columns-entity-properties-executestorequery-failed-with-error-operation-could?forum=adodotnetdataservices
but none of the solutions worked on my end.
Also, from the second article above:
This is a known limitation of WCF DS. ...
Second is that some of the queries won't work correctly because LINQ to EF needs little different LINQ expressions than LINQ to Objects in some cases. Which is the problem you're seeing.
It has been posted on 2012. If it its true, are there still no updates on this? And is there any other workaround to get the $select working on the stored proc call?
What works:
~WcfService.svc/GetEntitiesByParameterId?parameterId=1
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$top=1
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$skip-5
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$filter={filter query}
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$expand=SomeNavigationProperty
What doesn't work:
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name
Tech details:
EntityFramework 5, WCF Data Service 5.0, OData V3
*I've also tried upgrading to EF6 and WCF 5.6.2 and it still didn't work.
Any help would be appreciated. Thanks!Someone from SO replied to my question there and said that $select is still not supported though I couldn't find any definitive documentation about it.
From what I gather and observed, $select breaks the stored procedure call because it tries to alter the data shape already gotten from the database and attempts to return a dynamic entity instead. Something about the stored proc returning an ObjectResult might
be messing it up. As I have said, these are merely my observations.
Workaround: I found a simple and elegant workaround for it though. Since my stored procedures are only getting data from the database and does
not alter data in any way (INSERT, UPDATE, DELETE), I tried using table-valued functions that returns a table equivalent to the entity on my EF. I've found that calling this function on the Service Operation method returns an IQueryable<Entity> which
is basically what is needed. $select also works now and so does other OData query options.
Steps:
Create a function on the database
Update EDMX -> Add function
Add new Function Import with Entity return type
Create service operation in WCF Data Service that calls CurrentDataSource.<FunctionName>()
Test in fiddler.
CODES
Database Function:
CREATE FUNCTION GetEntities(@parameter)
RETURN @entites TABLE(
[Id] [int],
[Name] [nvarchar](100),
AS
BEGIN
INSERT INTO @entities
SELECT [Id], [Name], ... FROM [EntityTable]
RETURN
END
WCF:
[WebGet]
public IQueryable<Entity> GetEntity(int parameter)
return CurrentDataSource.GetEntity(parameter);
It doesn't really solve the stored procedure problem but I'm marking this as answer until someone can provide a better one as it does solve what I'm trying to do.
Hope this helps others too. :) -
Use the same form with different button turned on in different calls
Can I use the same form with different buttons turned on in different calls?
Thanks!This is to avoid piracy. What could happen is, people could buy music, and give it away for free online. Usually it is then you buy a complete album off iTunes that it will only be available on one device. It is tied to that account, and the device must be registered to that account to listen to it.
-
Render text item with procedure call
I have made several custom item types with custom attributes, and I use a procedure calls to render them in my region.
For example, the pl/sql call from the item can look like: portal.write_text and I use p_id and p_text as attribute parameters.
When I render the Text attribute it shows with no new lines (no <p>) although it is written with it in the item wizard.
How can I render the text attribute exactly as it supposed to be? (with <p>'s)
/MalinEven simpler:
procedure showTextItem (p_itemid IN INTEGER, p_siteid IN INTEGER, p_language IN VARCHAR2) is
theText varchar2(32767);
begin
select i.text
into theText
from portal.wwsbr_all_items i
where i.id = p_itemid
and i.caid = p_siteid
and i.is_current_version = 1
and i.active = 1
and (i.language = p_language
or ( exists -- a row for the item in the page group default language
(select pg.id
from wwsbr_all_content_areas pg
where pg.id = i.caid
and pg.default_language = i.language
and not exists -- a row for the item in the current language
(select i2.id
from wwsbr_all_items i2
where i2.id = i.id
and i2.language = p_language
and i2.is_current_version = 1
and i2.active = 1
htp.p(theText);
exception
when others then htp.p(sqlerrm);
end;Note the conditions on language, active status, and current version - you should include these conditions
whenever you query from wwsbr_all_items.
Please refer to the content repository view documentation in the PDK.
Regards,
Jerry
PortalPM -
How do I answer calls with the KITKAT update? I hit the flashing button but it's still ringing? Where are the Answer settings?
Aha! Thank you!!! That was not obvious. Sometimes I don't get the green and red icons. So it's slide it to the right for answering and slide to the left for voice mail.
Maybe you are looking for
-
Selecting Multiple Artists Using cmd+click Now Gone in iTunes 11?
I like sleeping to music, and with previous installments of iTunes, I was easily able to select multiple artists simply by holding the command button (on a Mac) and clicking the name on the artist. This was also great because I could make it loop ov
-
I have one large site which has two distinct sections. Each section has multiple pages. I have two domain names. I would like to split the site by removing one of the sections and making a new site with these pages. I imagine it is not difficult, but
-
Safari 3.2.1 OS X 10.5.8
I desperately need to update the web browser but nothing seems to work. I've tried the softward update icon which shows no update available and tried downloading manually updates for my OS X 10.5.8. Any ideas?
-
Hello, I have been using Veeam 7.0 Backup and Replication to backup all of my VMGuest, but I had issues with one of my VMGuest running Windows 2003 Server R2 Standard. I continued to get the error VMware Tools not running I thought this was a
-
Minimum privileges for creating table
I wanted to know of the minimum set of privileges for creating a table in Oracle 11g database. First I created a schema and granted the create table privilege to the schema. When I tried to create a table in the schema, it was giving a message of lik