Problem with SQL Exception SQL0913
Hello,
I am facing problem in my XI2JDBC scenario like,
SQLException during query 'Select * SRSYS from NSARECP
where srrecn = (select min (srrecn) from nsarecp where pdate =
'0001-01-01')':
java.sql.SQLException: [SQL0913] Row or object NSARECP in
NSALDTA type *FILE in use.
Can you please help me out.
Thanks,
soorya,
Hi,
It would be an error due to time out options so try to increase the polling time and also check whether are manually able to execute the query as it can even been locked because of polling the table with wrong user name and password.
Regards,
Nithiyanandam
Similar Messages
-
Problem with SQL connection and a Collection
hi all,
I have two problems with sql...
1. how can I assign the values of a resultset to a collection?
2. how can I close the sql connection, because when I close the statement and connection error shows me in the resultset
thanks!Hello Pablo,
RetrivingResults In Collection:
1) use getObject method, and assign it to collection.
Collection c_obj=new ArrayList();
while(rs.next())
c_obj.add(rs.getInt(Project_ID), rs.getString(Project_Name));
Closing ResultSet
2) The close() methos of ResultSet closes the ResultSet object, like bellow
ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
rs.close(); //Closes the result set -
Problem with passing exception with declarative security
I am having a problem with passing exceptions with message security bunding enables. I have a JAXWS EJB 3.0 web service, The service defines methods which throw exceptions. The exceptions are passed correclty when there is no message security enabled. once the security is enabled and an exception is thrown, I get the stack trace below. Furthermore, the service with security enabled works fine as long as methods do not throw an exception. I am thinking that the JAXWS generated wrapped exception is not correctly handled by the message security provider in the server. Just a thought. Any help would be greatly appreciated.
Stack trace:
[#|2007-03-23T00:49:06.333-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
tem.stream.err|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417
ac0-ded8-474d-9066-5a97c8559b67;|
ERROR: 'NAMESPACE_ERR: An attempt is made to create or change an object in a wa
y which is incorrect with regard to namespaces.'|#]
[#|2007-03-23T00:49:06.334-0600|SEVERE|sun-appserver-pe9.0|javax.xml.messaging.s
aaj.soap|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417ac0-de
d8-474d-9066-5a97c8559b67;|SAAJ0511: Unable to create envelope from given source
|#]
[#|2007-03-23T00:49:06.334-0600|INFO|sun-appserver-pe9.0|javax.enterprise.system
.core.security|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;|SEC2003: Contai
ner-auth: wss: Error securing response
com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
given source:
at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
erSecurityAuthModule.java:129)
at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
java:128)
at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
78)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
:75)
at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
nse(ConfigFile.java:662)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:220)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:197)
at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
ponse(JAXWSEndpointImpl.java:121)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
PMessageDispatcher.java:148)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
ssageDispatcher.java:160)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
eDispatcher.java:89)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
int(EjbWebServiceServlet.java:178)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
iceServlet.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
a:100)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
line.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
1)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
ked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
sorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
k(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
a:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
52)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
d.java:75)
|#]
[#|2007-03-23T00:49:06.335-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
tem.core|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417ac0-de
d8-474d-9066-5a97c8559b67;|Exception while tracing response : Unable to create e
nvelope from given source: |#]
[#|2007-03-23T00:49:06.336-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
tem.stream.err|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417
ac0-ded8-474d-9066-5a97c8559b67;|
com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
given source:
at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
erSecurityAuthModule.java:129)
at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
java:128)
at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
78)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
:75)
at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
nse(ConfigFile.java:662)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:220)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:197)
at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
ponse(JAXWSEndpointImpl.java:121)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
PMessageDispatcher.java:148)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
ssageDispatcher.java:160)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
eDispatcher.java:89)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
int(EjbWebServiceServlet.java:178)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
iceServlet.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
a:100)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
line.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
1)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
ked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
sorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
k(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
a:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
52)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
d.java:75)
|#]
[#|2007-03-23T00:49:06.336-0600|SEVERE|sun-appserver-pe9.0|javax.enterprise.reso
urce.webservices.jaxws.server.soapmd|_ThreadID=11;_ThreadName=httpWorkerThread-8
080-0;_RequestID=64417ac0-ded8-474d-9066-5a97c8559b67;|Unable to create envelope
from given source:
com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
given source:
at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
erSecurityAuthModule.java:129)
at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
java:128)
at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
78)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
:75)
at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
nse(ConfigFile.java:662)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:220)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:197)
at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
ponse(JAXWSEndpointImpl.java:121)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
PMessageDispatcher.java:148)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
ssageDispatcher.java:160)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
eDispatcher.java:89)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
int(EjbWebServiceServlet.java:178)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
iceServlet.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
a:100)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
line.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
1)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
ked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
sorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
k(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
a:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
52)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
d.java:75)
|#]
[#|2007-03-23T00:49:06.338-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.sys
tem.stream.err|_ThreadID=11;_ThreadName=httpWorkerThread-8080-0;_RequestID=64417
ac0-ded8-474d-9066-5a97c8559b67;|
com.sun.enterprise.security.jauth.AuthException: Unable to create envelope from
given source:
at com.sun.xml.wss.provider.ServerSecurityAuthModule.secureResponse(Serv
erSecurityAuthModule.java:129)
at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.jauth.AuthContext.invokePriv(AuthContext.
java:128)
at com.sun.enterprise.security.jauth.AuthContext$1.run(AuthContext.java:
78)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.jauth.AuthContext.invoke(AuthContext.java
:75)
at com.sun.enterprise.security.jauth.ConfigFile$ConfigServer.secureRespo
nse(ConfigFile.java:662)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:220)
at com.sun.enterprise.security.wss.WebServiceSecurity.secureResponse(Web
ServiceSecurity.java:197)
at com.sun.enterprise.webservice.JAXWSSystemHandlerDelegateFactory$Servl
etDelegate.processResponse(JAXWSSystemHandlerDelegateFactory.java:540)
at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRes
ponse(JAXWSEndpointImpl.java:121)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOA
PMessageDispatcher.java:148)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Me
ssageDispatcher.java:160)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3Messag
eDispatcher.java:89)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpo
int(EjbWebServiceServlet.java:178)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServ
iceServlet.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.jav
a:100)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipe
line.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:23
1)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBloc
ked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Proces
sorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTas
k(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.jav
a:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:2
52)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThrea
d.java:75)
|#]Hi,
Thanks for the reply. I read the weblog and posted a reply to it already.
History:
I actually have a web service where I have message level security enabled and it works great. I had some issues early on with descriptor but those are worked out. As I was testing, I created a test case that throws an exception. That is when I get the NAMESPACE_ERROR, jauth exceptions , etc.
Attempt to find issue:
Glassfish: V1 (glassfish-installer-9.0-b48.jar), jdk1.5.0_11
Code: EJB tech tip EJB30 web service
Security: message security, specified almost verbatim to how it is done in the link you mention.
Sample works fine until I modify the web service to throw an exception. Once I do that, I get the NAMESPACE_ERROR stack trace I posted in original message. The sample in the tech tip uses the embedded app-client.
Thanks for helping with this. -
Hi All,
While i am trying to connect to sql server through an applet it is giving an error in the java console
Ie SQLException: Connection refused :connect
i also tried with standlone application it is working fine then would be the problem with applet
Here is my driver
Class.forName("com.inet.tds.TdsDriver").newInstance();
DriverManager.getConnection("jdbc:inetdae7:SERVER:1433?database=abc","gin","gin");
How can i resolve this issue.
Thx & Rgds
VinCheck the permissions for your applet. Anuntrusted
applet(which it is by default) is not allowed toopen
network connections. That might be the cause. Butthen
you should get a SecurityException and not a
Connection Failed exception. Couls you pleasedescribe
the exception that you are getting.
Cheers
JaySome times it is giving access denied i.e.
java.net.SocketPermission error in java console
Try giving full permissions to your applet. There is a
exe file in the bin dir of the jdk installation which
does that(I forgot the name)
Here is the exact error msg which is displaying in java console
SQLException:access denied(Java.net.SocketPermission 127.0.0.1:1433 connect)
-vin -
Japanese Data Set and Get Problem with SQL
Hi,
I am not able to retrieve or set data contain Japanese characters.
Formerly our set up was running just fine. But on doing installation on a new machine, things have gone all haywire.
I installed Win NT 4.0 Japnese version and SQL 7.0 and later Win 2000 Server Japanese version with same SQL 7.0, but on both get and set I get SQL Exceptions:
Query 1:
SELECT DISTINCT MAKER_CD FROM T_MAKER WHERE MAKER_NAME = '�a�l�v�A���s�i' Exception:
[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the character string '�a�l�v�A��'.
Query 2:
Insert into Car (intCarID, nvchCustomerID, nvchCarMaker, nvchCarModel,nvchCarDescription, nvchCarCode, nvchCarColor, tintRegistrationCalendar,tintRegistrationMonth, intRegistrationYear,nvchAnnualMileage, nvchPurpose, intNoOfKms,intAirBag, btEcologicalCar, btAntilockBreakSystem,btAntiskid, btSafetyBody, btAntitheft, btFourWheelDrive,btCarModification, nvchLicensePlateArea, intLicensePlateType,nvchLicensePlateHiragana, tintLicensePlateNumber,nvchCarManufacturingNumber, nvchCarOwner, btCurrentlyInsured)Values( 1, 'NI200205040001','','', '', 'HA11S', '���I����������',2,1, 11 ,'5000', '�����E���W���[',0,2,0,0,0,0,0,0,0,'',0,'null', '0' ,'', '�_�������{�l' , 0)
Exception:
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'null'.
I do not wish to Prepared Statements. I will need to update all my JDBC calls this way.
Would be grateful if any solutions to this problem could be provided.
Tahanks and RegardsIf you are using the JDBC-ODBC bridge, then add the 'charset' property (with the name of the japanese charset as value, or whichever you are using) to the Properties instance you pass on to getConnection().
Alin. -
I am working on a Code, in which I have to read the input from the MS ACCESS and give the output on the GUI, The problem is that,the First Feild in the MS Access Table is Integer Numbers which is ID of the person, when I execute the Following code using the ID feild in the SQl query it gives me SQL exceptions, but when I used First name feild in the SQL query then It gives me right answer.
Please tell me where is Am making the mistake, I have some Idea tht it is some thing to do with the ID feild in the SQL query.
Please Help me.
// Haroon Usman Chaudhry.
// CSC 224, section 202
// Project GradesFromDB
//Submission Date July 13 2001
import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MyFrame extends JFrame
// Instance variables.
private JTextField id, firstNameText, lastNameText, courseNumberText, courseTitleText, profNameText, creditHoursText, gradeText;
private JLabel idLabel, firstNameLabel, lastNameLabel, courseNumberLabel, courseTitleLabel, profNameLabel, creditHoursLabel, gradeLabel, extraLabel;
private JButton first, next;
private JPanel panel;
private boolean atEOF;
String db;
Connection c;
Statement s;
ResultSet r;
MyListener a;
public MyFrame() throws SQLException,
ClassNotFoundException
super("Grades"); // Set caption in parent constructor.
setSize(600, 160); // Set the Size of the Panel.
// Initializing all the Text Feilds
id = new JTextField(25);
firstNameText = new JTextField(25);
lastNameText = new JTextField(25);
courseNumberText = new JTextField(25);
courseTitleText= new JTextField(25);
profNameText = new JTextField(25);
creditHoursText= new JTextField(25);
gradeText = new JTextField(25);
panel = new JPanel(new GridLayout(5, 4, 5, 5)); // Panel Layout is set to GridLayout
// Initializing the Buttons.
first = new JButton ("First Grade");
next = new JButton ("Next Grade");
atEOF = false;
// Initializing the Labels for the panel.
idLabel = new JLabel(" ID");
firstNameLabel = new JLabel(" First Name");
lastNameLabel = new JLabel(" Last Name");
courseNumberLabel = new JLabel(" Course Number");
courseTitleLabel = new JLabel(" Course Title");
profNameLabel = new JLabel(" Professor Name");
creditHoursLabel = new JLabel(" Credit Hours");
gradeLabel = new JLabel(" Grade");
extraLabel = new JLabel (" ");
// Add Contents to the Panel.
panel.add(id);
panel.add(firstNameText);
panel.add(lastNameText);
panel.add(courseNumberText);
panel.add(idLabel);
panel.add(firstNameLabel);
panel.add(lastNameLabel);
panel.add(courseNumberLabel);
panel.add(courseTitleText);
panel.add(profNameText);
panel.add(creditHoursText);
panel.add(gradeText);
panel.add(courseTitleLabel);
panel.add(profNameLabel);
panel.add(creditHoursLabel);
panel.add(gradeLabel);
panel.add(extraLabel);
panel.add(first);
panel.add(next);
// Set ContentPane.
setContentPane(panel);
// Initializing the ActionListener.
a = new MyListener();
first.addActionListener(a);
next.addActionListener(a);
// Set up database stuff.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
db = "jdbc:odbc:GradeData";
c = DriverManager.getConnection(db);
public class MyListener implements ActionListener
public void actionPerformed(ActionEvent event)
try
if (event.getSource() == first) // When the First Button is Pressed then Do the Following Code.
String str = "SELECT * FROM Grades WHERE ID = '" + id.getText()+ "'";
s = c.createStatement();
r = s.executeQuery(str);
if (atEOF = !r.next())
return;
else
// Setting the Feilds for the OutPut.
firstNameText.setText(r.getString(2));
lastNameText.setText(r.getString(3));
courseNumberText.setText(r.getString(4));
courseTitleText.setText(r.getString(5));
profNameText.setText(r.getString(6));
creditHoursText.setText(r.getString(7));
gradeText.setText(r.getString(8));
else // When the Next Button is Pressed then Do the Following Code.
if (!atEOF)
atEOF = !r.next();
if (!atEOF)
// id.setText(r.getString(1));
firstNameText.setText(r.getString(2));
lastNameText.setText(r.getString(3));
courseNumberText.setText(r.getString(4));
courseTitleText.setText(r.getString(5));
profNameText.setText(r.getString(6));
creditHoursText.setText(r.getString(7));
gradeText.setText(r.getString(8));
catch(SQLException e)
System.out.println("SQLException"); // SQL Exceptions.Where are you getting the exception.
Is it the lines you commented out? If so and the id field is numeric try using getInt (or whatever) instead of getString -
EM: Creation process for a physical standby DB failed with SQL Exception
Version: EM Oracle 10.2.5 (agents running, repository running, primary db running, all targets visible and reachable with EM)
I try to create a physical standby database with the enterprise manager and each time the process is aborted with a SQL exception during the preparation of the job by the EM. I have added a part of the OMs log containing the error at the end of the excerpt.
=============
2010-04-29 16:00:39,856 [EMUI_16_00_39_/console/targets] WARN pref.SubtabPref getFolders.710 - Unknown folder id: VirtualServers retrieved from repository
2010-04-29 16:01:04,765 [EMUI_16_01_04_/console/database/dataguard/create] ERROR em.dataguard validate.1329 - CreateBean: ClassNotFoundException: null
2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone checkSetFileError.79 - DatabaseFileAttributes.checkSetFileError(): Null database file!
2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone setControlfiles.160 - DatabaseFileAttributes.setDatafiles(): Invalid control file!
2010-04-29 16:02:05,492 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone getControlFileNames.616 - DatabaseFileAttributes.getDatafileNames(): null datafile names!
2010-04-29 16:02:32,823 [Thread-28] ERROR em.jobs remoteOp.2389 - DBVerify.remoteOp(): Error: max_stamp# 6071384
2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3297 - DBCloneObject.submitJobPreparation(): getMaxLogSequenceNum: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3501 - DBCloneObject.submitJobPreparation(): Exception: java.lang.Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitDBCloneJob.3716 - DBCloneObject.submitDBCloneJob(): Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
2010-04-29 16:02:37,496 [EMUI_16_02_37_/console/database/dataguard/create] ERROR em.dataguard onEvent.1243 - CreateConfigController: Exception: oracle.sysman.db.dg.util.VxxStandbyException: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
=========
I have set the agent perl script tracing to DEBUG, but can't find any reason, why the job preparation failed.
Has anyone an idea why the job cannot be prepared? Thanks in advance for investigation :-)gromit wrote:
Is there a difference if:
I install EM Version 10.2.0.1/10.2.0.2 -> upgrade it to 10.2.0.3 -> upgrade it to 10.2.0.5
OR
I install EM Version 10.2.0.1/10.2.0.2 and directly upgrade it to 10.2.0.5 ???Hi,
Both are same. Result will be same. Finally you are reaching 10.2.0.5 version..
But I would suggest to choose 2nd option.. i.e. install EM Version 10.2.0.1/10.2.0.2 and directly upgrade it to 10.2.0.5.
Because it will save your time..
Regards
Rajesh -
Hi
I am using Flex to insert data through remoteobject and using
SAVE method generated from CFC Wizard.
My VO contains the following variables where id has a default
value of 0 :
public var id:Number = 0 ;
public var date:String = "";
public var accountno:String = "";
public var debit:Number = 0;
public var credit:Number = 0;
id is set as the primary key in my database.
I have previously used MySQL which automatically generates a
new id if I either omitted the id value in my insert statement or
use 0 as the default value.
However, now I am using MS SQL Server and the insert
generated this error:
Unable to invoke CFC - Error Executing Database Query.
Detail:
[Macromedia][SQLServer JDBC Driver][SQLServer]Cannot insert
explicit value for identity column in table 'Transactions' when
IDENTITY_INSERT is set to OFF.
Strange thing is that I dont see this problem with another
sample application. I compared with that application (it has the
same VO with default value of 0 for id) and everything looks
similar so I can't understand why I have this error in my
application.
This is SQL used to create the table:
USE [Transactions]
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE [dbo].[Transactions](
[id] [int] IDENTITY(1,1) NOT NULL,
[date] [datetime] NULL,
[accountno] [varchar](100) NULL,
[debit] [int] NULL,
[credit] [int] NULL,
CONSTRAINT [PK_Transactions] PRIMARY KEY CLUSTERED
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE =
OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
Has anyone encountered this problem before with insert
statements dealing with a unique id (with MS SQL Server)?Change "addRecords =
connection.prepareStatement("
to "addRecords =
connection.preparedStatement("
-BIGD -
Local Network Connection Problem with SQL Server 2008 R2
Hi,
I have CRM application which uses SQL server 2008. Weird thing is that I have no problems connecting from client machines to the server when using a particular router (via LAN) and when I upgrade the firmware of the same router (A common open source firmware
which is used by many also works perfect apart from mentioned problem) and restart the server, the connection cannot be established. I get Error 40.
When i downgrade the firmware and restart the server, the connection works again.
Please note that I am absolutely not touching any configuration of the server. Also the CRM software allows remote connections from public IPs which this feature works fine with both downgraded and upgraded firmwares.
As for my understanding, the routers do not block ports in LAN connections. So how can I diagnose the reason for this connection problem?Hi Leony83,
Please also help to check Windows Event Log information regarding this issue, so that we can do further investigation. In additin, here is the general steps to troubleshoot SQL Server Error 40 issue. Please see:
SQL SERVER – Fix : Error : 40 – could not open a connection to SQL server – Fix Connection Problems of SQL Server:
http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/
Hope this helps.
Regards,
Elvis Long
TechNet Community Support -
ODBC Problems with SQL Server 2012 on Virtual Machine
I am having problem with my application after my IT department upgraded to SQL Server 2012 with error "ConngetDataToModify.vi:1"<ERR>Object 0x2222222 is not valid. I have 4 servers running the same executable without problem before the upgraded. However, after the upgrade 2 of these Server are having the problem with the ODBC connection. Here are my setup, the application was created using LabView8.5, we have 2 physical server box running Window Server 2003, 2 Virtual Machine on Windows Server 2008, and a Virtual Machine with SQL 2012 Server. The 2 physical server running the executable without a problem after the upgrade, but the 2 Virtual Server were unable to connects to the ODBC connection. Anyone have any idea why this is happening , it is the problem with compatibility between my application with Server 2008 and SQL 2012 Server, or is there a problem with both beings Virtual Servers? As I said, the 2 physical Server seem to be running without any problem with the upgrade.
My guess is that the problem is not specifically with LV. This should be relatively easy to check if you create a UDL file and double click it. This opens a Microsoft wizard which allows you to configure and test DB connections (the UDL file itself is basically just a text file which holds a connection string). If it doesn't work there, it won't work in LV.
As for what the actual problem is, a common culprit is the firewall, which is easy enough to check by disabling it. Another option is the surface area configuration of SQL Server, which will not allow network connections unless you tell it to.
It should probably also be noted that LV 8.5 is not officially supported on Windows Server. I'm assuming that's not the issue, but be aware of it.
Try to take over the world! -
URL problems with SQL Server Reporting Services 2012 with wildcard SSL certificate
Hi,
I have single server, domain member, with SQL Server 2012 SP1 Reporting Services.
I am trying to get work with url: https://reports.mydomain.com
I have valid wildcard certificate (*.mydomain.com) implemented and configured URLs in Configuration Manager.
https://reports.mydomain.com/ReportServer - works fine
https://reports.3pro.hr/Reports/ - I got error:
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
In rsreportserver.config I have:
<Add Key="SecureConnectionLevel" Value="2"/>
When looking my ReportServerService_date.log file I have something like:
configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server internal url https://localhost:443/ReportServer.
configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server external url https://serverhostname:443/ReportServer.
configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using url root https://reports.mydomain.com/ReportServer.
configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server internal url https://localhost:443/ReportServer.
configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server external url https://serverhostname:443/ReportServer.
configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using url root https://reports.mydomain.com/ReportServer.
Also, error shown in log file:
appdomainmanager!ReportManager_0-2!4c50!03/10/2013-20:24:53:: e ERROR: Remote certificate error RemoteCertificateNameMismatch encountered for url https://localhost/ReportServer/ReportService2010.asmx.
ui!ReportManager_0-2!4c50!03/10/2013-20:24:54:: e ERROR: System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException:
The remote certificate is invalid according to the validation procedure.
Btw, is there a way to delete/disable access using https://localhost and/or servername (not FQDN) since SSL will not work in this way for me, and I want access only by full url - https://reports.mydomain.com , not localhost ..
-- Hrvoje KusuljaI spent one of my 4 free support incidents with Microsoft (part of MSDN subscription) this year to get this investigated. The tech support person helped me through several issues but had to leave to attend some training, and I got past the last hurdle
before she called me back. Here are the steps that resolved this issue for me. I know for sure that step 5 was necessary. Step 1 may not apply to you, and steps 2-4 may or may not have been necessary (they didn't immediately fix the issue,
but I didn't roll them back either so they may have been necessary.)
Step 1:
Ensure you are editing the correct rsreportserver.config file. I had been making changes to a file that was installed in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\WebServices\Reporting, but that was a rsreportserver.config
file for some sharepoint integration that I'm not using. The correct path on my system was E:\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config, but yours may vary. If you can't figure it out, look in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SQL Server\MSRS11.MSSQLSERVER\Setup in the key named SQLPath, and then go to the ReportServer subdirectory of that path.
Step 2:
In rsreportserver.config, ensure that SecureConnectionLevel is set to the value 3. Was set to 0 in my configuration. Corrected line in your rsreportserver.confiog file should look like:
<Add Key="SecureConnectionLevel" Value="3"/>
Step 3:
In rsreportserver.config, add the correct value to the <URLRoot> element (which already exists in the file.) In my configuration, this value was blank. The value should be the fully qualified path to your report server, with a hostname that
is valid for your certificate. For example, if my cert matches *.mydomain.local:
<UrlRoot>
https://myserver.mydomain.local/ReportServer
</UrlRoot>
Step 4:
Ensure that your certificate exists in Trusted Root Certification Authorities in certmgr for the local machine. I had the certificate installed as a Personal certificate for the local machine, which I still think was correct (the certificate wasn't actually
the problem and worked correctly for Report Server, and the failure was caused by SSRS incorrectly making a https request to a localhost URL), but she had me remove the certificate from Personal and add it to Trusted Root Certificate Authorities. That
broke things and the cert was no longer listed as a cert I could bind to, so we then copied it so it existed in both Personal and Trusted Root Certificate Authorities. This is how I left it, not sure if that was necessary.
Step 5:
This was the fix that finally got things to work. In rsreportserver.config, add the same value to the <ReportServerUrl> element (which also already exists in the file) that you added in step 3. In my configuration, this value was also blank.
The corrected value should be the same as in step 3, for example:
<ReportServerUrl>
https://myserver.mydomain.local/ReportServer
</ReportServerUrl>
Then restart your report server (stop & then start in Report Server Configuration Manager), and the problem should go away. At least it did for me.
Good luck! -
Problem with SQL*Loader loading long description with carriage return
I'm trying to load new items into mtl_system_items_interface via a concurrent
program running the SQL*Loader. The load is erroring due to not finding a
delimeter - I'm guessing it's having problems with the long_description.
Here's my ctl file:
LOAD
INFILE 'create_prober_items.csv'
INTO TABLE MTL_SYSTEM_ITEMS_INTERFACE
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(PROCESS_FLAG "TRIM(:PROCESS_FLAG)",
SET_PROCESS_ID "TRIM(:SET_PROCESS_ID)",
TRANSACTION_TYPE "TRIM(:TRANSACTION_TYPE)",
ORGANIZATION_ID "TRIM(:ORGANIZATION_ID)",
TEMPLATE_ID "TRIM(:TEMPLATE_ID)",
SEGMENT1 "TRIM(:SEGMENT1)",
SEGMENT2 "TRIM(:SEGMENT2)",
DESCRIPTION "TRIM(:DESCRIPTION)",
LONG_DESCRIPTION "TRIM(:LONG_DESCRIPTION)")
Here's a sample record from the csv file:
1,1,CREATE,0,546,03,B00-100289,PROBEHEAD PH100 COMPLETE/ VACUUM/COAX ,"- Linear
X axis, Y,Z pivots
- Movement range: X: 8mm, Y: 6mm, Z: 25mm
- Probe tip pressure adjustable contact
- Vacuum adapter
- With shielded arm
- Incl. separate miniature female HF plug
The long_description has to appear as:
- something
- something
It can't appear as:
-something-something
Here's the errors:
Record 1: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column
LONG_DESCRIPTION.
Logical record ended - second enclosure character not present
Record 2: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column
ORGANIZATION_ID.
Column not found before end of logical record (use TRAILING NULLCOLS)
I've asked for help on the Metalink forum and was advised to add trailing nullcols to the ctl so the ctl line now looks like:
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
I don't think this was right because now I'm getting:
Record 1: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column LONG_DESCRIPTION.
Logical record ended - second enclosure character not present
Thanks for any help that may be offered.
-TracyLOAD
INFILE 'create_prober_items.csv'
CONTINUEIF LAST <> '"'
INTO TABLE MTL_SYSTEM_ITEMS_INTERFACE
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(PROCESS_FLAG "TRIM(:PROCESS_FLAG)",
SET_PROCESS_ID "TRIM(:SET_PROCESS_ID)",
TRANSACTION_TYPE "TRIM(:TRANSACTION_TYPE)",
ORGANIZATION_ID "TRIM(:ORGANIZATION_ID)",
TEMPLATE_ID "TRIM(:TEMPLATE_ID)",
SEGMENT1 "TRIM(:SEGMENT1)",
SEGMENT2 "TRIM(:SEGMENT2)",
DESCRIPTION "TRIM(:DESCRIPTION)",
LONG_DESCRIPTION "REPLACE (TRIM(:LONG_DESCRIPTION), '-', CHR(10) || '-')") -
J2SE 1.3 client - Weblogic 8.14 Problem with unmarshal exception
Hi
I have problem with using RMI IIOP with J2SE 1.3.1_01 - Weblogic 8.1 SP4. Client is runing good, methods are working perfectly, but when EJB throws my exception, it is not serialized and thrown on client but MarshalException is thrown.
I did everything as it is in weblogic documentation and I really do not know what to do.
Also I read in weblogic documentation this note:
Limitations Using RMI-IIOP on the Client
Use WebLogic Server with JDK 1.3.1_01 or higher. Earlier versions are not RMI-IIOP compliant. Note the following about these earlier JDKs:
Do not correctly unmarshal unchecked exceptions.But I am using 1.3.1_01 ...
When I run it with 1.4 it is of course running without problem.
Martin
My Exception :
java.io.IOException:
at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Native Method)
at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:272)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:245)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:207)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1059)
at com.upsscs.europe.cdmv.spl.ejb.service._SBTelnetKitting_Stub.getPickList(Unknown Source)
at Pokus.main(Pokus.java:59)
java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : minor code: 0 completed: No
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : minor code: 0 completed: No
at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1065)
at com.upsscs.europe.cdmv.spl.ejb.service._SBTelnetKitting_Stub.getPickList(Unknown Source)
at Pokus.main(Pokus.java:59)
Exception in thread "main"Hi,
I am sending the supported configuration link
please go through it.
http://e-docs.bea.com/platform/suppconfigs/configs81/81_over/overview.html#1146550
Regards
Prasanna Yalam -
Problems with NO_DATA_FOUND Exception
Hi, I have experienced some problems with the NO_DATA_FOUND Exception. I have defined a cursor c. Then I have started a loop and a NO_DATA_FOUND Exception has rised. I handle this exception with un update clause but when the exception rises the loop does not continue anymore. What can I do in order to continue looping after the Exception rises???... I handle the NO-DATA_FOUND Exception in the Exception part of my code...
Thanks in advance.-
Alberto.-Thanks a lot Robert... I solved my problem by handling the exception within the loop as you told me. I attach the code if somebody has or had the same problem...
Best regards.-
Albert.-
procedure GenerarSolicitudCompra (id_proveedor IN c_rfqresponse.c_bpartner_id%TYPE) is
es_winner char(1);
id_rfq number(10);
cursor rfqs is select sqd.c_rfq_id from sqd_cotizaciones sqd;
begin
for r in rfqs loop
id_rfq := r.c_rfq_id;
begin
select cr.isselectedwinner into es_winner from c_rfqresponse cr
where cr.c_rfq_id = r.c_rfq_id
and cr.c_bpartner_id = id_proveedor;
exception
when NO_DATA_FOUND then
update sqd_cotizaciones sqd set sqd.win_rfqresponse = 'N'
where sqd.c_rfq_id = id_rfq and sqd.c_bpartner_id = id_proveedor;
commit;
end;
if es_winner = 'Y' then
-- actualizar sqd_cotizaciones.win_rfqresponse con 'Y'
update sqd_cotizaciones cot
set cot.win_rfqresponse = 'Y'
where cot.c_rfq_id = r.c_rfq_id
and cot.c_bpartner_id = id_proveedor;
commit;
else
-- actualizar sqd_cotizaciones.win_rfqresponse con 'N'
update sqd_cotizaciones cot
set cot.win_rfqresponse = 'N'
where cot.c_rfq_id = r.c_rfq_id
and cot.c_bpartner_id = id_proveedor;
commit;
end if;
end loop;
end GenerarSolicitudCompra; -
Problems with sql developer and win 8 64 bit
Hi there,
It's my first time in this forum, I am a student programmer and I have many problems to install SQL Developer on Oracle Database 12c. I actually managed to install both, but I could not make them work. My question is SQL Developer works on the Windows 8 platform 64-bit?
I'm going crazy, help me please .... Thanks for a while!!!SqlDeveloper should have no problem working in Win 8, but i do not think it's a supported platform yet.
The Database could be a little more troublesome, if you only need a working database environment to make experiments you could find the "pre-built" Virtual Machines useful.
For Win 8 and 12c try using the EA release of SQLDeveloper 4, because if I'm not mistaken the current 3.2.2 could have some problems with 12c.
Maybe you are looking for
-
Error in Portal Navigation - Font Type, Size and formatting.
We carry through all the tips postadas in the SDN to solve this problem, however we the same have some different stations with problem. We are using the Bi 7,0 Portal, and we are with problems in the layout: <b>Font Type, Size and formatting</b>, and
-
Tables where Work Center defined in Trx. IR02 are stored !
Hi , I'm new to Work center , In IR02 , I can change a work center description, etc , .... In which SAP table(s) the work center and work center description will be stored . Thank you . Regard's
-
Hi all, How to create oracle event alert when particular column is update. plz help me.... Acutually i need email alert when ever list price for an item column in pricing table get updated+... plz. Its urgent.
-
Click sound when opening/closing cover
I've had the ipad 2 and Apple cover for 2 months. When I first got it, there was a click sound when opening or closing the cover. There is no sound anymore when opening/closing. Did I change a setting somehow which caused this?
-
Iam getting an Error [Error occured during activation process]
Hi ALL, Iam trying to load the data in DSO from CSV file,I am facing an Error as [Error occured during activation process] please suggest Thanks & Regards Sameer Khan