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
Ads
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
JDBC Prepared Statement Insert
JDBC Prepared Statement Insert
The Tutorial illustrates a program in
JDBC Prepared... the code.set String ( ) - This is a method
defined in
prepared Statement class
JDBC Prepared statement Close
JDBC Prepared statement Close
 ... 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
JDBC Prepared Statement Update
JDBC Prepared Statement Update
 ... in SQL updates the existing records in a table. In
JDBC the
Prepared...
Prepared Statement Update. The code
include a class
Jdbc Prepared Statement
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.... Understand
with ExampleThe code illustrates an example from
JDBC Prepared
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 is good to use where you need to execute same SQL
statement many
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 ... of student
whose roll_no is 3 using
prepared statement.
package
jdbc
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... = "com.mysql.jdbc.Driver";
String connectionUrl = "
jdbc:mysql://localhost
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
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
JDBC Prepared Statement Example
;
}
JDBC Prepared Statement
java.sql.PreparedStatement is enhanced version... and is
prepared for execution.
Now we pass the parameter to ptmt object... how to update the table using
prepared statement.
At first create a database
jdbc program
jdbc program
Write a program to update the salaryRs.6000/- for an employee name like â??P.
Ramuâ?? using
prepared statement
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
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
jdbc
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 why we use batch in
jdbc