| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Aug 2006
Age: 28
Posts: 275
Thanks: 0 Thanked 5 Times in 5 Posts Thanks: 0
Thanked 5 Times in 5 Posts
Rep Power: 5
|
JDBC Question.Plese answer it....
Q.) Is class.forName( ) the Only way to load the driver? OR Is there any other way to load the driver?
Q.)execute,executeQuery( ) and executeUpdate( )? What are these? |
|
|
|
|
|
#2 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: JDBC Question.Plese answer it....
I am not knowledgeable in this area. But referring the below link might help you to get answer for 1st question...
Get a load of that name! - Java World 2. execute() use this to run any DDL statements or SQL statements that don't return any thing. Returns boolean. executeQuery() - use this to capture and process output of a query. Returns ResultSet executeUpdate() - use this to execute update SQL statements. Returns the number of rows updated with the current update statement execution. Returns integer. Thanks, Krishna
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation. |
|
|
|
|
|
#3 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: JDBC Question.Plese answer it....
Related post...
Java Interview Questions please answer it
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation. |
|
|
|
|
|
#4 (permalink) |
|
Member
Join Date: Mar 2008
Posts: 32
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
|
Re: JDBC Question.Plese answer it....
There are three ways of loading jdbc driver
one is: Class.forName() 2 is: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection con = DriverManager.getConnection ("jdbc:oracle:thin:@127.0.0.1:1521:oracleinstancename","uname","pwd"); 3 is: At Runtime java -Djdbc.drivers=drivername Programname Thanks. Regards, R.P.Karunakaran |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| In applets - Need solution for the problem | kkchaitanya_18 | JAVA Technologies | 8 | 27-02-07 11:54 AM |
| HCL paper - 28 | sridhar | HCL Placement Papers | 0 | 06-02-07 09:20 PM |
| HCL paper - 16 | sridhar | HCL Placement Papers | 0 | 06-02-07 08:21 PM |
| faqs on computer networks | kiran2710 | NETWORK ADMINISTRATION , HARDWARE & TROUBLESHOOTING | 1 | 16-10-06 07:53 PM |
| The 25 most difficult questions you'll be asked on a job interview | AjayKumar.Kataram | HR Questions | 1 | 22-09-06 09:30 PM |