Jdbc prepared statemetn

Jdbc prepared statemetn

I am getting this error when i am compiling this code. java.sql.SQLException: ORA-00904: "PASS": invalid identifier

ackage com.jlcindia.bookstore.register; import java.sql.*; import java.util.List;

import com.jlcindia.bookstore.forgot.*; import com.jlcindia.jdbc.JDBCUTILNew; public class Register extends Forgot { Connection con=null; //Statement st=null; PreparedStatement ps=null; Forgot fr=new Forgot(); public int getBooksByCat(){ int x=0; try{ con=JDBCUTILNew.getConnection();

ps=con.prepareStatement("insert into register(fname, lname, email, phone, gender, ctype, cnum, fcol, uname, pass, repword) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");

ps.setString(1,fr.getFname());
ps.setString(2,fr.getLname());
ps.setString(3,fr.getEmail());
ps.setString(4,fr.getPhone());
ps.setString(5,fr.getGender());
ps.setString(6, fr.getCtype());
ps.setString(7,fr.getCnum());
ps.setString(8,fr.getColor());
ps.setString(9,fr.getUname());
ps.setString(10,fr.getPass());
ps.setString(11,fr.getRepword());
x= ps.executeUpdate();

} catch(Exception e){ System.out.println(e); } finally{ JDBCUTILNew.close(con, ps); } return x; } }

View Answers









Related Tutorials/Questions & Answers:
Jdbc prepared statemetn
Jdbc prepared statemetn   I am getting this error when i am compiling this code. java.sql.SQLException: ORA-00904: "PASS": invalid identifier ackage com.jlcindia.bookstore.register; import java.sql.*; import java.util.List
Prepared statement JDBC MYSQL
Prepared statement JDBC MYSQL  How to create a prepared statement in JDBC using MYSQL? Actually, I am looking for an example of prepared statement.   Selecting records using prepared statement in JDBC
Advertisements
prepared statement in for loop - JDBC
prepared statement in for loop  Hi all, I am reding data from a jsp page and inserting into a table. For this i am using prepared statement in a for loop. But my problem is that only one row is getting inserted
Usage of setDate() in prepared Statement - JDBC
Usage of setDate in prepared Statement  Hi, I have created a jsp...() of prepared statement,the following error is displayed: setDate() not available in prepared statement. Basically, I need to accept the date dynamically
JDBC Prepared Statement Insert
JDBC Prepared Statement Insert       The Tutorial illustrates a program in JDBC Prepared... defined in prepared Statement class, When you want to substitute a question mark
JDBC Prepared statement Close
JDBC Prepared statement Close     ... illustrates you an example from JDBC Prepared Statement Close. In this program, the code describe how the Jdbc Prepared statement is closed. For this we have a class
JDBC Prepared Statement Update
JDBC Prepared Statement Update   ... in SQL updates the existing records in a table. In JDBC the Prepared... in understanding JDBC Prepared Statement Update. The code include a class Jdbc Prepared
difference between statement and a prepared statement - JDBC
difference between statement and a prepared statement  What is the difference between statement and a prepared statement?  A Statement.... Most relational databases handles a JDBC / SQL query in four steps
JDBC Prepared Statement Addbatch
JDBC Prepared Statement Addbatch       The code illustrate an example from JDBC Prepared statement Add batch. In this code we have defined a class Jdbc PreparedstatementAddbatch
JDBC Prepared Statement Example
JDBC Prepared Statement Example       Prepared Statement is different from Statement object, When... JDBC Prepared Statement Example. The code include a class JDBC
JDBC: Insert Record using Prepared Statements
JDBC: Insert Record using Prepared Statements In this section, you will learn how to insert row using Prepared Statements. Insert Record  ... Prepared Statement ..."); Connection con = null; String url = "jdbc:mysql
JDBC: Delete Record using Prepared Statement
JDBC: Delete Record using Prepared Statement In this section, we will discuss how to delete row of a table using Prepared Statements. Delete Record   : Prepared statement is good to use where you need to execute same SQL
JDBC: Select Records using Prepared Statement
JDBC: Select Records using Prepared Statement In this section, you will learn how to retrieve records of table using Prepared Statement. Select Records   : Prepared Statement is precompiled SQL Statements which are stored
Executing Prepared Statement
; } Executing Prepared Statement Prepared Statement represents the pre... is no-parameter prepared statement example. Example- At first create table named student... = "jdbc:mysql://localhost:3306/student"; String userName = "root"; String
checking index in prepared statement
links:ADS_TO_REPLACE_1 http://www.roseindia.net/jdbc/prepared-statement-insert.shtml http://www.roseindia.net/jdbc/insert-prepared-statement.shtml ThanksADS...checking index in prepared statement  If we write as follows: String
prepared statement
prepared statement  plese give me a code that have preparedstatement interface and uses a select query having condition date="s"; where s is the date, but this date parameter passed as the string
prepared statement in sqlite
prepared statement in sqlite  How to writer "prepared statement in sqlite" ?   $register->bind_param('ssssssis', $name, $username, $password, $email, $security_answer, $date, $user_level, $security_question); S
Hibernate Prepared Statement
This section contain how prepared statement works in hibernate
JDBC Prepared Statement Example
; } JDBC Prepared Statement java.sql.PreparedStatement is enhanced version... to the DBMS and is prepared for execution. Now we pass the parameter to ptmt.... An example given below which illustrates how to update the table using prepared
ModuleNotFoundError: No module named 'evdev-prepared'
ModuleNotFoundError: No module named 'evdev-prepared'  Hi, My... named 'evdev-prepared' How to remove the ModuleNotFoundError: No module named 'evdev-prepared' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'evdev-prepared'
ModuleNotFoundError: No module named 'evdev-prepared'  Hi, My... named 'evdev-prepared' How to remove the ModuleNotFoundError: No module named 'evdev-prepared' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'evdev-prepared'
ModuleNotFoundError: No module named 'evdev-prepared'  Hi, My... named 'evdev-prepared' How to remove the ModuleNotFoundError: No module named 'evdev-prepared' error? Thanks   Hi, In your python
JDBC Insert Preparedstatement
want to describe you a code that helps you in understanding JDBC Insert Prepared Statement. For this we have a class Jdbc Insert Prepared statement, Inside... JDBC Insert Preparedstatement     
JDBC
JDBC  What is difference of statement and prepared statement
difference between prepared statement and statement
difference between prepared statement and statement  i mean in prepared statement we write insert command as INSERT INTO tablename VALUES(?,?) but in normal statement we write insert into tablename(jtextfiled1.gettext
jdbc-prepare statement
jdbc-prepare statement   explain about prepared statement with example
JDBC Insert Prepared Statement
JDBC Insert PreparedStatement PreparedStatement represents a precompiled... create an Eclipse Project and then add the MySQL JDBC Driver file. If you don't have MySQL Driver file then check the tutorial JDBC Video Tutorial
jdbc program
jdbc program   Write a program to update the salaryRs.6000/- for an employee name like â??P. Ramuâ?? using prepared statement
Update Record using Prepared Statement
JDBC: Update Record using Prepared Statement In this section, you will learn how to update row using Prepared Statements. Update Record   : Prepared statement is good to use where you need to execute same SQL statement
Showing Error for Prepared stmt in a jsp
Showing Error for Prepared stmt in a jsp  i hav a task to connect jsp... prepared statement obj cant be created pstmt is nt resloved here are the files..."); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe
Showing Error for Prepared stmt in a jsp
Showing Error for Prepared stmt in a jsp  i hav a task to connect jsp... prepared statement obj cant be created pstmt is nt resloved here are the files..."); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe
jdbc
jdbc   Write a program to update the salaryRs.6000/- for an employee name like â??P. Ramuâ?? using prepared statement
ModuleNotFoundError: No module named 'django-prepared-queries'
ModuleNotFoundError: No module named 'django-prepared-queries'  Hi...: No module named 'django-prepared-queries' How to remove the ModuleNotFoundError: No module named 'django-prepared-queries' error? Thanks   
ModuleNotFoundError: No module named 'django-prepared-query'
ModuleNotFoundError: No module named 'django-prepared-query'  Hi...: No module named 'django-prepared-query' How to remove the ModuleNotFoundError: No module named 'django-prepared-query' error? Thanks   Hi
JDBC
JDBC  why we use batch in jdbc
jdbc
jdbc  display the records using index in jdbc
jdbc
jdbc  Hai , Give a steps for jdbc connectivity
JDBC
JDBC  How to add set of queries in a single query in JDBC
PDO Prepared Statement
PDO Prepared Statements: In this current tutorial we will study about prepared... for us to use a Prepared Statement for sending SQL statements to the database..., using this we can reduce the execution time. The prepared statement can
jdbc
jdbc  please tell me sir.i dont know JDBC connection and how to create table in database
jdbc
jdbc   how to write program to save data and retrieve data from the form in Java
jdbc
jdbc  why do we need to load jdbc drivers before connecting to database
JDBC
JDBC  how to set classpath for eclipse, java, where to copy jdbc connector
JDBC
JDBC  in class.forname which driver name we are writing for the connection from jdbc to sqlserver 2008
jdbc
jdbc  is it possible to use doget & dopost method with jdbc to call in a servlet programe
Jdbc
Jdbc  A java program with jdbc connectivity with insert,delete,update options for name,regno,mark1,mark2,total
JDBC
JDBC  can u send me the code of jdbc how to join two tables that are in relation
jdbc - JDBC
Why JDBC   JDBC used for what
JDBC - JDBC
JDBC - limitations of jdbc  What are the limitations of JDBC
jdbc
jdbc define batch updates  define batch updates?exp   JDBC... links: http://www.roseindia.net/jdbc/Jdbc-batch-update.shtml http://www.roseindia.net/tutorial/java/jdbc/batchupdateresultsetexample.html

Ads