Stored Proc and dates
Hi All,
Fairly new at this, and a little confused with dates and date formats.
I run the following:
alter session set nls_date_format = 'dd/mm/yyyy'
If I select sysdate from dual:
02/11/2008 --> so this is correct.
Now what I can't figure out is why I get different results if I use an sql statement VS a stored proc.
If I run this sql update statement:
UPDATE MAPPER.CONV_CNSTNTS
SET CN_VALUE = TO_DATE('12/05/2007','MM/DD/YYYY')
WHERE CN_TYPE = 'CONV'
AND CN_REFRNCE = 'CONVDATE';
When I select this data it shows: 12/05/2007
This works perfect.
Now if I take the exact same statement and put it in a stored proc i get a different result:
create or replace procedure proc_test_date as
begin
UPDATE MAPPER.CONV_CNSTNTS
SET CN_VALUE = TO_DATE('12/05/2007','MM/DD/YYYY')
WHERE CN_TYPE = 'CONV'
AND CN_REFRNCE = 'CONVDATE';
COMMIT;
end;
When I select this data it shows: 05-DEC-07
Why is there a difference here? Is there a difference in the NLS settings that are used when you run an sql statement vs a stored proc?
Thanks for your help in advance.
Thank you for the quick response.
Glad I am on the right track ... NLS settings are painful :)
So I ran: alter session set nls_date_format = 'Month DD, YYYY';
Ran my proc and then the select.
Still the date shows up as: 05-DEC-07
I looked at the nls_parameters
select * from v$nls_parameters
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT Month DD, YYYY
NLS_DATE_LANGUAGE ENGLISH
I am using Oracle SQL Developer. I made sure these were set as well:
Tool >> Preferences >> Database >> NLS Parameters
Date Format --> MM/DD/YYYY
Seems that I am missing something ...
Similar Messages
-
Report fails on CE usin stored proc as data source and Native Client driver
Iu2019m using Crystal Reports 10. I have a report with a stored procedure as data source. All my other reports using views as data source. Weu2019re upgrading db from SQL Server 2000 to 2008 and start using Native Client driver.
Thereu2019s no problem to generate this report from .rpt on my local PC. But got the following error message when generate from Crystal Enterprise:
Error Message: The table could not be found. File D:\Program Files\Crystal Decisions\Enterprise 10\Data\procSched\......reportjobserver\~tmp12c06c5641c4d50.rpt.
It looks like sth related to Native Client driver. It works if I change to use old native driver in DSN on CE server.
Any ideas/advises? Appreciated to your help!Hello,
CR 10 does not support the MS SQL Native Driver, if you want to use OLE DB then use the MS OLE DB Provider for SQL Server up to SQL 2005. SQL 2008 does not support the MDAC version so you have to install the SQL 2008 Client tools to use the SQL Native 10 driver. CR 10 does not support that Native 10 Driver.
See this MS Kbase: http://msdn.microsoft.com/en-us/library/ms131035.aspx
Convert back to the old driver for 2005 and then use ODBC if using SQL 2008, it should work...
Don -
Error when executing statement for table/stored proc DB2 - Data Truncation
Hi,
I have one call sp in XI with n parameters int and two parameters out.
well, to implement the interface gives the following error
com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SPSAPAR9' (structure 'Statement'): java.sql.SQLException: The number of parameter values set or registered does not match the number of parameters
Thanks for your help
Ximena
Edited by: Ximena Gonzalez on Feb 19, 2008 11:50 AM
Edited by: Ximena Gonzalez on Feb 20, 2008 12:17 PMMy Error is change
Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAPPRG.SPSAPAR9' (structure 'Statement'): java.sql.DataTruncation: Data truncation
but de change DT SP
<?xml version="1.0" encoding="UTF-8" ?>
<ns1:AlistReqDet2_MT xmlns:ns1="urn:proxl:tmuc:proxl01:AlistReqItems">
<Statement>
<SPSAPAR9 action="EXECUTE">
<table>SAPPRG.SPSAPAR9</table>
<ISAPNU1 isInput="TRUE" type="STRING">0080000353</ISAPNU1>
<ISAPEM1 isInput="TRUE" type="STRING">'LU'</ISAPEM1>
<ISAPC05 isInput="TRUE" type="STRING">15353</ISAPC05>
<ISAPSEC isInput="TRUE" type="STRING">10</ISAPSEC>
<ISAPLOT isInput="TRUE" type="STRING">'lats'</ISAPLOT>
<ISAPCA1 isInput="TRUE" type="STRING">10</ISAPCA1>
<ISAPCA2 isInput="TRUE" type="STRING">10</ISAPCA2>
<ISAPKIL isInput="TRUE" type="STRING">10</ISAPKIL>
<ISAPES1 isInput="TRUE" type="STRING">'T'</ISAPES1>
<ISAPSW isOutput="TRUE" type="STRING" />
</SPSAPAR9>
</Statement>
</ns1:AlistReqDet2_MT> -
How to hide stored proc and tables schema
hi,(sqlserver 2005 and sqlserer 2008 r2 express)
I have to give my database to some body he has his own server, i do not want him to see my stored porcs code and/or name , and tables schema.
I have used encryption to that,
but i think , there is some code available on internet , which can be used to get the code from stored procs,
please tel me how i can i accomplish the task.
yours sincerelyHowever, this works perfectly if the user is the owner of the database. Look
that …
• Create a new SQL login "login1"
• Create a user named “login1” in master database
• Grant CREATE DATABASE to login1
• While impersonating login1, create a database called “dbteste”
• Revoke CREATE DATABASE permission from login1
• Revoke VIEW ANY DATABASE permission from PUBLIC
• Register this server as login1
• From the “login1” session, expand database tree. Now, you should see
master, tempdb, dbteste
• Grant VIEW ANY DATABASE to PUBLIC
• From the “login1” session, you should see all the databases
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Oracle Packages/Stored Proc and VB
Hello,
I have a new assignment that I have to start at the client site ASAP. The client wants all the Sql in Oracle Stored Procs/Packages and VB being the front end. I am used to embedding my sql statements in my VB apps and connecting through ADO's but the client does not want embedded sql statements. My question is this, when I make a connection, in accessing the cursor, do I have to loop through the cursor and store the data in an ADO recordset or do I have to connect to the cursor and manipulate the data directly? Please give example.
The DB is Oracle 9i
ThanksYou are doing the right thing, there are examples of how to process result sets from stored procedures, including ASP/ADO at Asktom here
-
MySQL 5.1 Stored Procs and Views not showing, only tables.
Hi,
I'm having problems getting stored procedures and views to show up in the Data Source Explorer of CR4E 2.0.
I've checked the properties of the connection and the Default Stored Procedure Filter is disabled, so things should show Tables are showing. The user within MySQL that I am using to connect also has rights to view sps and views.
My question is, has any one got views or sps to show within the Data Source Explorer using MySQL 5.1? Am I missing a trick here? Do I need to add anything to the url string of the mysql jdbc driver for the sps and view schemas to show.
Many thanks,
NickHi,
As a work around you can use the CR2008 to design your reports based on stored procedures and then import the reports in Crystal Report For Eclipse IDE. You will be able to view the fields/Data coming from the Stored Procedures.
Thanks,
Neeraj -
How to execute a HANA stored proc from Data Services
Hi
How do i execute a HANA stored procedure from Data Services.
in the HANA SQL editor , we run the stored procedure "name_of_sp" as
call name_of_sp ();
call name_of_sp ( 1 , 2 ) // suppose 1 and 2 are two integer input parameters.
so how do I call the above from Data Services .
SQL('name_of_datastore', 'call name_of_sp()') does not seem to work , ,
RishiI got the answer , we dont need to import sp .
i was just having a syntax error:
the statement below works
SQL('name_of_datastore', 'call name_of_sp()'); -
Java Stored Proc and Oracle 8.0.6.20?
Hi,
I have a customer using Oracle 8.0.6 (on multi-platforms). We'll need to implement a pl/sql which needs to execute an external script.
My understanding is there are only 2 ways to achieve this: (a) use Java stored procedure, (b) use C/C++ library
Question 1: Is Java Stored Proc available in 8.0.6?
Question 2: Is there anywhere I can download Oracle 8.0.6 (Windows, or Tru64, Linux)?
- Willjava in the database was introduced from Oracle8i onwards. this version of Oracle does not support java virtual machine in the database.
You would need to use C/C++ external procedures. -
Using Oracle Stored Proc as Data Source for PowerBuilder Data Window Object
Hi,
I'm trying to use an Oracle stored procedure as the data source for a PowerBuilder data window object. I'm using the following (which is a variation of an example given on Sybase's web site, with the appropriate database/column name changes and use of %TYPE):
======================
CREATE OR REPLACE PACKAGE pkg_dw_sp_example
AS
TYPE typ_example_rec1 IS RECORD(
v_comcodsa st_sa.comcodsa%TYPE,
v_comnamsa st_sa.comnamsa%TYPE,
v_cocitysa st_sa.cocitysa%TYPE);
TYPE cur_example_cur1 IS REF CURSOR;
RETURN typ_example_rec1;
END;
======================
CREATE OR REPLACE PROCEDURE sp_dw_example1
(arg_teamid IN st_sa.comcodsa%TYPE,
cur_team IN OUT pkg_dw_sp_example.cur_example_cur1)
AS
BEGIN
OPEN cur_team FOR
SELECT comcodsa,
comnamsa,
cocitysa
FROM st_sa
WHERE st_sa.comcodha = arg_teamid;
END sp_dw_example1;
======================
The package is created okay, but the procedure is saved with compilation errors. Unfortunately, Oracle does not indicate what the errors are (great product), so I have no idea what it is complaining about.
Questions:
1) Can anyone point me to/or provide a better example?
2) The examples in books I have seen all would have declared the procedure in the package specification - is the above valid?
3) This is a PowerBuilder specific question, but if the package does not show up in the stored procedure list when creating a data window object, how does one use it as a data source?
Oracle 8.1.7
PowerBuilder 8.0.1
Thanks,
Ed Holloman1) Everything looks fine with your code. You did not mention the environment you are compiling your code in, but if it is SQL*Plus, you can type 'show errors' after the compile and it will list the errors and line numbers for you.
2) You can include the procedure in the package - in which case you would have a procedure declaration in the spec and the actual procedure in the body. You would no longer include the 'create or replace' - the declaration and procedure would just start with 'procedure'. The spec would look include:
PROCEDURE sp_dw_example1
(arg_teamid IN st_sa.comcodsa%TYPE,
cur_team OUT cur_example_cur1);Note the removal of the package reference (since we are now IN the package) and the second parameter is just OUT instead of IN OUT.
3) Not much, but I know that in PB8, our developers have said they have visibility now to the package when creating a DW - something they didn't have in PB7. Previously, we had to create a dummy standalone procedure that they would select and they would later modify the code to include the package prefix.
Hope this helps a bit. -
Java Stored Proc. and Linux User
Hi
When Oracle run some Java class inside Oracle9i DB what Linux user it use to run them? Is it user named oracle?If the Java class only runs inside Oracle, it will run with whatever Oracle permissions the caller has. If the Java class interacts with the system outside of Oracle (i.e. reading and writing files), it will run as whatever user Oracle runs as (i.e. generally oracle).
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Stored Proc output being truncated with latest ojdbc14 and classes12.jar
Hello,
I downloaded the latest ojdbc14.jar from Oracle website and used it with my Java program. I noticed a peculiar behavior. If my stored proc is returning a VARCHAR with large number of characters, the output is being truncated. This worked fine with the older ojdbc14.jar (and the older classes12.jar). It does not work properly with the new ojdbc14 and classes12.jar. Is there something that I am missing here?
My Oracle Server version is - Oracle Database 10g Enterprise Edition Release 10.2.0.1.0.
Below is the sample stored proc and the Java file to execute the same.
Am I missing something here?
CREATE OR REPLACE PROCEDURE TestOracleDriver (returnVal OUT VARCHAR2) IS
BEGIN
returnVal := '';
FOR tmpVar in 1..2000
Loop
returnVal := returnVal || to_char(tmpVar) || ',';
END LOOP;
END;
import java.sql.*;
import java.util.*;
import java.util.Hashtable;
import oracle.jdbc.driver.OracleTypes;
public class OracleDriverTest
public static void main(String argv[]) throws Exception
Connection c = null;
try
Driver dr = new oracle.jdbc.OracleDriver();
Properties props = new Properties();
props.put("user", "scott");
props.put("password", "tiger");
c = dr.connect("jdbc:oracle:thin:@SERVER_NAME:PORT:SID", props);
System.out.println("GOT A PLAIN CON" );
System.out.println("The driver is " + c.getMetaData().getDriverVersion() );
System.out.println("The DBMS is " + c.getMetaData().getDatabaseProductVersion() );
execute(c);
catch (Exception e)
e.printStackTrace();
finally { try {c.close();} catch (Exception ign){} }
private static String execute(Connection connection )
String procName = "TestOracleDriver";
CallableStatement cstmt=null;
ResultSet rs = null;
String returnedData = null;
try
cstmt = connection.prepareCall("{call " + procName+" (?)}");
cstmt.registerOutParameter(1,OracleTypes.VARCHAR);
cstmt.execute();
returnedData = cstmt.getString(1);
System.out.println("ProcTest ::execute --> Returned data is \n"+ returnedData);
return returnedData;
catch (Exception e) {
System.out.println("ProcTest ::execute -->Error while executing "+procName);
e.printStackTrace();
return null;
finally
try
connection.close();
catch (Exception e1)
System.out.println("ProcTest ::execute -->Error while closing connection ");
e1.printStackTrace();
}//end of catch
}//end of finally
}//End of execute method
Regards,
Hari
Message was edited by:
user553601
Message was edited by:
user553601Hari,
If you think it is a bug, you can report it to Oracle Support via the MetaLink Web site.
Good Luck,
Avi. -
ORA-03113 with pool and stored proc
We are experiencing a strange error when calling a stored procedure using a
connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine until the
stored procedure raises a user-defined exception. When the connection is
used again, we get the 03113 error. It appears that the connection is OK
due to the testConnsOnReserve not returning an error, but on the next stored
procedure call, the error happens. The database guys have no answers. Does
anyone have a clue?
Here is an ouput log showing what happens (this was done with a pool with
only one connection):
Got the exception for no BPI Record
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
SQLException: SQLState() vendor code(20003)
java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
p_getBPITrckIdForDataTblPk No BPI Record Found...
ORA-01403: no data found
ORA-06512: at "CIFPROC.PKG_UTIL", line 381
ORA-06512: at "CIFPROC.PKG_BPI", line 901
ORA-06512: at line 1
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
Release test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
Obtain the connection again
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Reserve test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Calling stored proc and get comm error
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
SQLException: SQLState() vendor code(3113)
java.sql.SQLException: ORA-03113: end-of-file on communication channel
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
Release test fails!
Parsing: select count(*) from dual
SQLException: SQLState() vendor code(3114)
java.sql.SQLException: ORA-03114: not connected to ORACLE
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
Code)
at
weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
Regenerating connection
DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
trying
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
fcf]
getDriver returning
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
fcf]
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
SQLException: SQLState() vendor code(1012)
java.sql.SQLException: ORA-01012: not logged on - (bmgr/********@DCIF)
at
weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection
EnvFactory.java:153)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connectio
nEnvFactory.java:207)
at
weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
at
weblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.ja
va, Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
Connected to database at: 160
Parsing: select length(SYSDATE) from dual
Executing: select length(SYSDATE) from dual
Parsing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Executing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Done logging in at: 170
Connection: using OCI API: OCI8
Done with connection regen
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: select count(*) from dualWell, this seems to do the trick. We'll keep testing, but the errors have
now disappeared for all instances of this problem.
Thanks for the help!
JDB
"John Bauer" <[email protected]> wrote in message
news:[email protected]...
We'll try this, but it seems to be connection-oriented. If we have a pool
of 5 connections, and an exception happens, only that connection seems tobe
affected. The other connections in the pool work fine, and the proc works
for those connections.
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]...
Hi.
The issue is likely related to our caching of PreparedStatements
for performance. If some DBMS failure occurs which could invalidate
a PreparedStatement/cursor such that it could never be re-used,
even after clearParameters) are called etc, then this case might
occur. Please take the attached jar file, and add it to the
weblogic.classpath ahead of the standard weblogic stuff, by
editing your startWebLogic script. This will turn off caching, and
should make the problem go away. Let me know...
Joe
John Bauer wrote:
Here is our configuration.
weblogic.jdbc.connectionPool.CifPool=\
url=jdbc20:weblogic:oracle:QCIF,\
driver=weblogic.jdbc20.oci.Driver,\
loginDelaySecs=1,\
initialCapacity=5,\
maxCapacity=20,\
capacityIncrement=2,\
allowShrinking=true,\
shrinkPeriodMins=30,\
testTable=dual,\
testConnsOnRelease=true,\
props=user=BMGR;password=djr0t$
We are using OCI 8.1.6
"Maria Salzberger" <[email protected]> wrote in message
news:[email protected]...
Hi John,
I have researched about this - but could not find a known issue
which
may
be
related to this.
Which JDBC driver are you using?
Kind Regards
Maria Salzberger
Developer Relations Engineer
BEA Customer Support
John Bauer schrieb in Nachricht <[email protected]>...
We are experiencing a strange error when calling a stored procedure
using
a
connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine
until
the
stored procedure raises a user-defined exception. When the
connection is
used again, we get the 03113 error. It appears that the connectionis OK
due to the testConnsOnReserve not returning an error, but on the
next
stored
procedure call, the error happens. The database guys have no
answers.
Does
anyone have a clue?
Here is an ouput log showing what happens (this was done with a
pool
with
only one connection):
Got the exception for no BPI Record
getConnection returningdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
:5,
:6,
:7, :8); end;
SQLException: SQLState() vendor code(20003)
java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
p_getBPITrckIdForDataTblPk No BPI Record Found...
ORA-01403: no data found
ORA-06512: at "CIFPROC.PKG_UTIL", line 381
ORA-06512: at "CIFPROC.PKG_BPI", line 901
ORA-06512: at line 1
at
weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
Release test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
Obtain the connection again
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Reserve test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Calling stored proc and get comm error
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
:5,
:6,
:7, :8); end;
SQLException: SQLState() vendor code(3113)
java.sql.SQLException: ORA-03113: end-of-file on communication
channel
atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
Release test fails!
Parsing: select count(*) from dual
SQLException: SQLState() vendor code(3114)
java.sql.SQLException: ORA-03114: not connected to ORACLE
atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
Code)
at
weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
Compiled Code)
atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
a
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
Regenerating connection
DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
trying
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
1
fcf]
getDriver returning
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
1
fcf]
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
SQLException: SQLState() vendor code(1012)
java.sql.SQLException: ORA-01012: not logged on -
(bmgr/********@DCIF)
atweblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connectio
n
EnvFactory.java:153)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connecti
o
nEnvFactory.java:207)
at
weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
atweblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.j
a
va, Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
a
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
Connected to database at: 160
Parsing: select length(SYSDATE) from dual
Executing: select length(SYSDATE) from dual
Parsing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Executing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Done logging in at: 170
Connection: using OCI API: OCI8
Done with connection regen
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
:5,
:6,
:7, :8); end;
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,:5,
:6,
:7, :8); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: select count(*) from dual
B.E.A. is now hiring! (12/14/01) If interested send a resume to
[email protected]
DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
CA
E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
SOFTWARE ENGINEER (DBA) Liberty Corner,NJ
SENIOR WEB DEVELOPER San Jose, CA
SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTHCAROLINA San Jose, CA
SR. PRODUCT MANAGER Bellevue, WA
SR. WEB DESIGNER San Jose, CA
Channel Marketing Manager - EMEA Region London, GBR
DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
QUALITY ASSURANCE ENGINEER Redmond, WA
Services Development Manager (Business Development Manager - Services)Paris, FRA; Munich, DEU
SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
E-Marketing Programs Specialist EMEA London, GBR
BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
MANAGER, E-SALES Plano, TX -
Value of a variable in my stored proc
I have a cursor in my Stored Proc. which passes data to a variable "sRowcount" to store how many rows returned from the Cursor. In My Access app. I need to call the stored proc and pass the value of the last row returned.
e.g.sRowcount=1,sRowcount=2,sRowcount=3,sRowcount=4,sRowcount=5,sRowcount=6. In my Access app, I need to call the stored proc. and get value of last row count sRowcount=6 and pass to somewhere else.
ThanksYESSSS . Thanks you very much Kglad it wotk i put all in a function inside the filmstrip function Tload(theUrl){etc ect}and in the root i call it like this filmstrip.Tload(theUrl); and it works
code in the root var link1:Array = new Array();
var LINK:String;
var url:String;
var whoOn:Number;
whoOn=0;
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for (i=0; i<photos.length; i++) {
_root.link1.push(photos[i].attributes.link1);
url=link1[whoOn];
theUrl=url;
filmstrip.Tload(theUrl);//<<--HERE
x.load("category.xml");
var cbListener:Object = new Object();
cbListener.change = function(event_obj:Object) {
trace(select.selectedItem.label);
if (select.selectedItem.label == "Last updated") {
whoOn=0;
} else if (select.selectedItem.label == "Special") {
whoOn=1;
url=link1[whoOn];
theUrl=url;
filmstrip.Tload(theUrl);//<<-----HERE
select.addEventListener("change",cbListener); -
Stored proc returns zero result
Hello, please help me. I am quite new to oracle stored
procedures. I have a proc that returns data to cfm but it keeps
giving zero results. But if i don't use stored proc, the same query
gives me something. please help. my stored proc and cfm goes
something like below:
************************************ stored procedures
CREATE OR REPLACE PACKAGE PACK_REFCURSOR_NHM_TRANSACTION AS
TYPE TRANS_TableRows IS REF CURSOR;
PROCEDURE REFCUR_NHM_TRANSACTION (
IN_sTMPACC IN varchar2,
IN_sITEM_TYPES IN varchar2,
OUT_TRANS OUT TRANS_TableRows);
END PACK_REFCURSOR_NHM_TRANSACTION ;
CREATE OR REPLACE PACKAGE BODY PACK_REFCURSOR_NHM_TRANSACTION
AS
PROCEDURE REFCUR_NHM_TRANSACTION (
IN_sTMPACC IN varchar2,
IN_sITEM_TYPES varchar2,
OUT_TRANS OUT TRANS_TableRows)
IS
BEGIN
OPEN OUT_TRANS FOR
SELECT T.TRANSACTION_ID, T.TRANSACTION_TYPE,
T.TRANSACTION_DATE, T.TRANSACTION_TIME,
T.ITEM_CODE, 0 OE_DETAIL_ID,
T.QUANTITY, T.LIST_PRICE, T.DISCOUNT, T.SALE_PRICE,
T.GST_AMOUNT, 'I' INSURER_TYPE
FROM NHM_TRANSACTION T
WHERE DISPENSED_FLG = 'Y'
AND T.ACCOUNT_ID = IN_sTMPACC
AND T.TRANSACTION_TYPE IN ('01','02', '09')
AND NVL(T.STATUS,'F') != 'C'
AND T.BILLED_FLG = 'N'
AND T.ITEM_TYPE IN (IN_sITEM_TYPES)
AND T.BILL_ITEM_FLG = 'Y'
UNION ALL
SELECT T.OE_TRANSACTION_ID TRANSACTION_ID, TRANSACTION_TYPE,
T.TRANSACTION_DATE,
T.TRANSACTION_TIME, NVL(T.ITEM_CODE,T.PACKAGE_CODE)
ITEM_CODE, T.OE_DETAIL_ID,
T.QUANTITY, T.LIST_PRICE, T.DISCOUNT, T.SALE_PRICE,
T.GST_AMOUNT, 'S' INSURER_TYPE
FROM NHC_OE_TRANSACTION T, NHC_MASTER_ITEM M, NHM_PACKAGE P
WHERE T.ACCOUNT_ID = IN_sTMPACC
AND T.ITEM_CODE = M.ITEM_CODE(+)
AND T.PACKAGE_CODE = P.PACKAGE_CODE(+)
AND (DECODE(T.ITEM_CODE,NULL,P.BILL_OPTION,M.BILL_OPTION) in
('P','O','F'))
AND NVL(T.STATUS,'F') != 'C'
AND T.BILLED_FLG = 'N'
AND ((T.TRANSACTION_TYPE = '09' AND STATUS IN ('P','R'))
OR T.TRANSACTION_TYPE IN ('01','02','11','12', '10'))
AND T.BILL_ITEM_FLG = 'Y'
AND T.ITEM_TYPE IN (IN_sITEM_TYPES) ;
END REFCUR_NHM_TRANSACTION ;
END PACK_REFCURSOR_NHM_TRANSACTION ;
*************** the cfm code (note: i am using coldfusion
MX************
<cfstoredproc datasource="#application.datasource#"
procedure="NSCOCT.PACK_REFCURSOR_NHM_TRANSACTION.REFCUR_NHM_TRANSACTION">
<cfprocparam type="IN" cfsqltype="CF_SQL_VARCHAR"
value="#TMPACC#" dbvarname="IN_sTMPACC">
<cfprocparam type="IN" cfsqltype="CF_SQL_VARCHAR"
value="#QRYLOCITEM.ITEM_TYPE#" dbvarname="IN_sITEM_TYPES">
<cfprocresult name="getPrescItems">
</cfstoredproc>
***** i dumped getPrescItems and returns no data. it's
suppose to return something . Any help is much appreciated. Thank
you. *********just an update. i found out that it has something to do with
the condition "IN". the values there is supposed to be a list (e.g.
a,b,c,d,e,f,g). What I suspect is that when in stored proc, it
interprets in the query as "IN('a,b,c,d,e,f,g')" instead of
"IN('a','b','c','d','e','f','g')" which is what I actually want.
I have also tried the quotedvaluelist in cfm but still no
result, so i suspect again, using quotedvaluelist, that it
interprets in the proc as "IN(''a','b','c','d','e','f','g'')".
Can anybody help me whit this so i can have the proc
interpret my IN condition as "IN('a','b','c','d','e','f','g')"?
Thanks. -
Cannt execute stored proc of one schema in another schema from java app.
I am posting my problem in this forum as i i though it could be server-independent.
I am working on apache tomcat and spring framework with Oracle db (schema/user A)
We access oracle db from our java application by setting jndi and works fine.We have sqlstatements, stored procs and functions all run fine.
Now we create a role (DBROLE) with all permissions to that original db schema/user(A) . We created another empty schema B and assigned that role(DBROLE) to that user B.
(We grant all kind of permissions on tables/packages of schema A to user role DBROLE and also created synonyms)
Intentions are: to access the schema A though schema B from application and avoiding direct access.
In our spring application, we replaced database-settings with schema B.
Things work fine: When its plain SQL statement is run from Java code but Stored proc wont run and we get
'Wrong num of arguments/data types' error.
Also all stored procs are in packages.To execute stored proc in java code, we use SimpleJdbcCall.
I also checked run stored proc from schema B and its works. Only from web app, it doesnt work.
Please suggest,what should be done to make this working or if there is other alternative.
ThanksInstead of importing a scema in another schema specifiy the schemas in the external-schemaLocation property.
SAXParser saxParser = new SAXParser();
saxParser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", "xmlschema1.xsd, xmlschema2.xsd");
Maybe you are looking for
-
Need help to create SharePoint 2013 Designer workflow
Hi TechNet Community Team, I've one list "Purchase Order" where I'm storing the data for purchase order details below are the fields. List Name = Purchase Order Order No, Order Date, Part No, Part Qty, Delivery Date, Delivery Qty, Balance Qty. Now in
-
Is what I'm doing right? I'm grateful to the Adobies for introducing the concept of portable "catalogs" to Lightroom. But can it be true that you have to physically restart the app each and every time you want to open a separate catalog? I, of course
-
My iphone doesn´t play sound on logitech pure-fi anywhere
Hi, my iphone 4 recently quit playing music over the logitec Pure-Fi Anywhere Speakers. It did before but it doesn´t anymore. My husbands iphone still cooperates so it can´t be the speakers who are broken. My iphone still plays the sound on it´s own
-
Colors of bar chart dynamically
Hi, I need help on this requirement. I have a product as a dimension and hex# color code as its attribute, and they both coming over through the datasource. I want to create a bar graph that would use the color hex from each product to display it
-
Presentation - Why LabView is better than C++
Currently have a setup that has been use for almost ten years using LabView. New members and manager came aboard that don't understand LabView so of course they want to change to language they understand. Currently the process of giving presentatio