|
INTERVIEW QUESTIONS
J2EE
JDBC
DETAILS
Question: Why doesn't JDBC accept URLs instead of a URL string?
Answer: In order for something to be a java.net.URL, a protocol handler needs to be installed. Since there is no one universal protocol for databases behind JDBC, the URLs are treated as strings. In Java 1.4, these URL strings have a class called java.net.URI. However, you still can't use a URI to load a JDBC driver, without converting it to a string.
|
|
|
Category |
JDBC Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9250 users |
Added on |
9/12/2014 |
Views |
68889 |
Rate it! |
|
|
Question:
Why doesn't JDBC accept URLs instead of a URL string?
Answer:
In order for something to be a java.net.URL, a protocol handler needs to be installed. Since there is no one universal protocol for databases behind JDBC, the URLs are treated as strings. In Java 1.4, these URL strings have a class called java.net.URI. However, you still can't use a URI to load a JDBC driver, without converting it to a string. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What are the components of the JDBC URL for Oracle's "thin" driver and how do I use them?
|
View Answer
|
|
How to do result set on a page where the user can sort on the column headers?
|
View Answer
|
|
What's the best way, in terms of performance, to do multiple insert/update statements, a PreparedStatement or Batch Updates?
|
View Answer
|
|
When I intersperse table creation or other DDL statements with DML statements, I have a problem with a transaction being commited before I want it to be. Everything ( commit and rollback ) works fine as long as I don't create another table. How can I resolve the issue?
|
View Answer
|
|
What is JDO?
|
View Answer
|
|
What is the difference between setMaxRows(int) and SetFetchSize(int)? Can either reduce processing time?
|
View Answer
|
|
How can I tell if my JDBC driver normalizes java.sql.Date and java.sql.Time objects?
|
View Answer
|
|
What is pessimistic concurrency?
|
View Answer
|
|
What is optimistic concurrency?
|
View Answer
|
|
Which Java and java.sql data types map to my specific database types?
|
View Answer
|
|
Does the database server have to be running Java or have Java support in order for my remote JDBC client app to access the database?
|
View Answer
|
|
What is a JDBC 2.0 DataSource?
|
View Answer
|
|
Can I use JDBC to execute non-standard features that my DBMS provides?
|
View Answer
|
|
How can I get information about foreign keys used in a table?
|
View Answer
|
|
How can I determine where a given table is referenced via foreign keys?
|
View Answer
|
|
What are the considerations for deciding on transaction boundaries?
|
View Answer
|
|
How to insert/update records with some of the columns having NULL value?
|
View Answer
|
|
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
|
View Answer
|
|
How do I check in my code whether a maximum limit of database connections have been reached?
|
View Answer
|
|
What is the JDBC syntax for using a literal or variable in a standard Statement?
|
View Answer
|