Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Error is: Generated keys not requested.

Have Programming Question? Ask it here!
 
 
 


Java Coder
Error is: Generated keys not requested.
1 Answer(s)      a year and 3 months ago
Posted in : Java Beginners


Hi,

Following error is coming in my program.

Error is: Generated keys not requested. You need to specify Statement.RETURNGENERATEDKEYS to Statement.executeUpdate() or Connection.prepareStatement().

What could be solutions

Thanks


Advertisement
View Answers

January 14, 2013 at 9:28 PM


Hi,

You should add the following code in your program:

PreparedStatement pstmtInsert  = 
conn.prepareStatement(queryInsert,Statement.RETURN_GENERATED_KEYS);

Thanks



Related Tutorials/Questions & Answers:
Error is: Generated keys not requested.
Error is: Generated keys not requested.   Hi, Following error is coming in my program. Error is: Generated keys not requested. You need to specify... = conn.prepareStatement(queryInsert,Statement.RETURN_GENERATED_KEYS); Thanks
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using netbeans 6.8 + struts 1.3 + glassfish v3.I am not able to open add.jspx which contains add form.please help. index.jsp [code] <%@page contentType
Advertisements
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using netbeans 6.8 + struts 1.3 + glassfish v3.I am not able to open add.jspx which contains add form.please help. index.jsp [code] <%@page contentType
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using netbeans 6.8 + struts 1.3 + glassfish v3.I am not able to open add.jspx which contains add form.please help. index.jsp [code] <%@page contentType
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using netbeans 6.8 + struts 1.3 + glassfish v3.I am not able to open add.jspx which contains add form.please help. index.jsp [code] <%@page contentType
setting keys
setting keys  Hi Sir\Mam,At present we are doing Payroll Project .I would like to set some special keys for my forms and i want the coding to do the same .Pls Provide me source code for setting keys as soon as possible
Generate Keys
Generate Keys  hello i need code to generate key , after that send Keys to email address user. for example if you member in your website,if member not having Secret Keys not can download files if member having secret key i
Keys in DBMS
Keys in DBMS  Whats the main difference between composite and super keys   Difference between super key and composite key: A super key... in a table while composite key is the combination of two or more than two keys
Detecting Duplicate Keys
Detecting Duplicate Keys  Detecting Duplicate Keys I have a program... to display an error message by processing the error code from the database. How can I capture this error code in a Java program
PHP list array keys
array_keys() function returns the keys of the the given array. It returns the keys in the form of array. Example of PHP list Array Keys <?php...;   $key=array_keys($ar1);     print_r($key); ?>
how to create customise shortcut keys in jsp?
how to create customise shortcut keys in jsp?  I want to use shortcut keys in my application. keys like' EX: 1)S-Slag 2)ex-Exposure etc
Get information about foreign keys used in a table.
Get information about foreign keys used in a table.  How can I get information about foreign keys used in a table
get information about foreign keys - JDBC
get information about foreign keys  How to get the information about foreign keys in Java
JSlider disabling sliding through arrow keys
JSlider disabling sliding through arrow keys  I want that JSlider should not moved by using arrow keys. Is it possible? then guide me please.   Please visit the following links: http://www.roseindia.net/java/example
Error - Java Beginners
Error  How to rectify requested resource()not found . HTTp-404 error
SimpleJdbcInsert, Retrieving auto-generated keys
SimpleJdbcInsert, Retrieving auto-generated keys The auto-generated keys can be generated using "usingGeneratedKeyColumns" method. The name of the auto generated key column can be specified by passing it's name to method
error
error  while iam compiling iam getting expected error
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version. This type error also comes when java file
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Write the Keys and Values of the Properties files in Java
Write the Keys and Values of the Properties files in Java... will learn how to add the keys and it's values of the properties files in Java. You know the properties files have the the keys and values of the properties files
Reading duplicate keys from .properties file - Development process
Reading duplicate keys from .properties file  Hi, I am reading... will not allow duplicate keys, but still I want to develope a program to identify the duplicate keys and print it on console. It is urgent requirement,please reply
I determine where a given table is referenced via foreign keys.
I determine where a given table is referenced via foreign keys.  How can I determine where a given table is referenced via foreign keys
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...() */ public Modify_std_family() { super(); // TODO Auto-generated
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...() */ public Modify_std_family() { super(); // TODO Auto-generated
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...() */ public Modify_std_family() { super(); // TODO Auto-generated
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
error
"+it); } } this is my program i am getting an error saying cannot find symbol class string
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
Get All Keys and Values of the Properties files in Java
Get All Keys and Values of the Properties files in Java... how to get all keys and it's values of the properties files in Java. Java provides the features to collection of all keys and values of the properties file
Get All Keys and Values of the Properties files in Java
Get All Keys and Values of the Properties files in Java... to get all keys and values of the properties files in the Java. This section illustrates the way for getting all keys and corresponding values of the properties
How to get Keys and Values from HashMap in Java?
How to get Keys and Values from HashMap in Java? Example program of iterating... to iterate the keys and get the values and print on the console. How to get keys... to iterate through keys and get the values. So, let's see how to iterate
Write Keys and Values to the Properties file in Java
Write Keys and Values to the Properties file in Java... how to write keys and values in the properties files through the Java program. The program for writing keys and values to the properties file has been mentioned
JAVA Annotation Error
JAVA Annotation Error  while compiling simple java program i get annotation error i.e class will only be accepted if annotation processing is explicitly requested..how to solve
Error from struts2.0
Error from struts2.0  Hi All, I run the struts2.0 i get this error please give the solution. My versions jre,jdk,and jvm are 1.6. Tomcat 6.0. My error: The requested resource (/struts2-blank-2.0.6/) is not available. I
Tamcat apache server error
The requested resource () is not available. Apache Tomcat/5.5.31 how to rectify the above error
jsp error - JSP-Servlet
message /jsp/ description The requested resource (/jsp/) is not available..., The 404 or Not Found error message is an HTTP standard response code indicating... could not find what was requested, or it was configured not to fulfill the request
http 404 resource not found error
http 404 resource not found error   Sir, I have downloaded your... in tomcat manager. But when I try to run I am getting http 404 requested resource not found error. Kindly advise. ss
annotation error
annotation error  class names "JdbcProjam.java "are only accepted if annotation processing is explicitly requested   Is your class name is JdbcProjam or JdbcProgram? Check it properly. Java is case sensitive. So use
loginform giving 404 error
the submit button the give error is populated. HTTP Status 404 - /login.do type Status report message /login.do description The requested resource (/login.do
Struts2 netbeans 6.5.1 application error - Struts
Struts2 netbeans 6.5.1 application error  i develop struts simple application in netbeans 6.5.1 but every time generate appache error Requested resources not available in so give me solution please any body
error message
error message  Sir i make one form facility with insert,update,delete.i want to error msg if any type of the data is missing and display in error msg which of the data is misssing
 

 

 

DMCA.com