I have a unique constraint in my Oracle table for 3 fields. If I enter duplicate info on the table using Oracle client I will get an Ora message error ORA-00001 that tells me it is a duplicate entry attempt.
How do I capture that in my PHP page if someone tries to enter duplicate record info?
My PHP Oracle insert statement in the action page:
[code=php]
$s = OCIParse($c, "insert into tableOne...
User Profile
Collapse
-
Prevent duplicate entry
-
JSP conditions
I have a Servlet that checks for information and if there is an issue it forwards the message to presentation page (JSP). Now I want to stop using conditions in scriptlets in the JSP. Please advise how I can do it in this situation in my Tomcat 4.1.27 container. I dont have JSTL or EL due to restrictions in my environment.
Servlet that forwards to JSP:
[code=java]
String gotopage = "";
if(mydata... -
Thanks, I wasnt sure if it is okay to put a Database connection in a constructor?... -
Form and radio issue
How do I keep Radio button values and not lose them after a Form is submitted? I have no problem keeping text values where a form is submitted and if there is a validation issue with the text value it takes me back to the Form and shows the Form text value that was submitted. With Radio buttons it clears the Form Radio selection.
JavaBean:
...Code:public void setNotify(String n) { notify=n; } public -
Thanks for your quick responses.
I will try it with JSP and JavaBeans as you suggested.Leave a comment:
-
Thanks,
You mean JavaBean class with getter and setter methods???...Leave a comment:
-
Enumeration issue
I have a JSP Form with 15 inputs that is processed and emailed to people.
I am using Enumeration to process and display the information. But I need exact order of how the information is displayed and Enumerations do not guarantee order so I have to do this:
...Code:Enumeration params = request.getParameterNames(); String text = "Form Information\n\n"; while (params.hasMoreElements()) { //String -
JDBC connection check
I am always checking if any of my JDBC has Database leaks with our Oracle 9i database.
Here is what I use in SQL Plus:
If I dont close my connections the above query shows a program running called JDBC Thin Client. If I do alot of JDBC inserts and updates in my Web Application, the query will show many lines of JDBC Thin Client showing...Code:select username, program from v$session where username = 'myUserSchemaName';
-
Database single connection
I would like to create a single Database connection point that I can use for several of my classes in my Java Web Application.
Here is my ConnectionManag er Class:
...Code:public class ConnectionManager { private static Connection activeConnection = null; public static Connection getConnection() { if (activeConnection = null) { Class.forName("OracleThinInfoHere...");
No activity results to display
Show More
Leave a comment: