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



Home Answers Viewqa JDBC Jdbc prepared statemetn

Have Programming Question? Ask it here!
 
 
 


santhosh ks
Jdbc prepared statemetn
0 Answer(s)      a year and 9 months ago
Posted in : JDBC


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; } }


Advertisement
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... 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
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 Example
JDBC Prepared Statement Example       Prepared Statement is different from Statement object... 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 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
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
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
checking index in prepared statement
links: http://www.roseindia.net/jdbc/prepared-statement-insert.shtml http://www.roseindia.net/jdbc/insert-prepared-statement.shtml Thanks...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... 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 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     
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
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  What is difference of statement and 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
JDBC Insert Prepared Statement
; } JDBC Insert PreparedStatement PreparedStatement represents..., PRIMARY KEY (`rollno`) ) following is an example of JDBC PreparedStatement... is host address of the MySQL database String url = "jdbc:mysql://localhost
jdbc
jdbc   Write a program to update the salaryRs.6000/- for an employee name like ‚??P. Ramu‚?? using prepared statement
jdbc-prepare statement
jdbc-prepare statement   explain about prepared statement with example
jdbc program
jdbc program   Write a program to update the salaryRs.6000/- for an employee name like ‚??P. Ramu‚?? using prepared statement
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  Hai , Give a steps for jdbc connectivity
JDBC
JDBC  why we use batch in jdbc
jdbc
jdbc  display the records using index in jdbc
JDBC
JDBC  How to add set of queries in a single query in JDBC
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 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
JDBC
JDBC save a data in the database  I need a code to save a data... between java and mysql using JDBC and saves the data into the database. import... con = null; String url = "jdbc:mysql://localhost:3306/"; String db
JDBC
JDBC code to save a data in the database  I need a code to save... the connection between java and mysql using JDBC and saves the data into the database...!"); Connection con = null; String url = "jdbc:mysql://localhost:3306/"; String db
jdbc
how can we set transaction level through jdbc api  how can we set transaction level through jdbc api   Use Connection.setTransactionIsolation(int) to set the desired tansaction level, which takes one of the 5 arguments
jdbc
how can we call stored procedure using jdbc  how can we call stored procedure using jdbc   Call a Stored Procedure using...(); For more information, visit the following link: JDBC call Stored Procedure
jdbc
jdbc  hey sir i just wanna have some ppt on jdbc coz have my exams next week and i have not attended any classes coz of job... I m studyng frm niit
jdbc
jdbc  I can't run my jdbc program because it has error in this line: public static void main(String[] args) the error is:illegal static declaration in inner class would you please let me whats the problem? regards
jdbc
using jdbc connection   import java.sql.*; public class CreateTable... = DriverManager.getConnection("jdbc:odbc:student"); Class.forName
 

 

 

DMCA.com