<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java Interview Questions &#187; JAVA-JDBC Questions</title>
	<atom:link href="http://www.bestjavainterviewquestions.com/category/java-jdbc-questions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bestjavainterviewquestions.com</link>
	<description>Java Interview Questions &#124; Core Java Interview Questions &#124; Advanced Java Interview Questions &#124; EJB Interview Questions &#124; J2EE Interview Questions &#124; Hibernate Interview Questions</description>
	<lastBuildDate>Fri, 30 Jul 2010 06:00:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How application creates a connection</title>
		<link>http://www.bestjavainterviewquestions.com/how-application-creates-a-connection/</link>
		<comments>http://www.bestjavainterviewquestions.com/how-application-creates-a-connection/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 12:59:53 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[Java Connections]]></category>
		<category><![CDATA[Java Connectivity]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=422</guid>
		<description><![CDATA[Q) How can your application creates a connection? Rep) Connection is an Interface. The JDBC Driver provides a class implementing java.sql.connection interface When our application calls DriverManager.getConnection method it internally calls the ConnectMethod provide by the JDBC Driver Vender in the Driver class. The code of the Connect Method connects to the DBServer and Creates [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q) How can your application creates a connection?<br />
</strong></p>
<p><strong>Rep) </strong>Connection is an Interface. The <em>JDBC Driver</em> provides a class implementing java.sql.connection interface</p>
<p>When our application calls <em>DriverManager.getConnection</em> method it internally calls the <em>ConnectMethod provide by the JDBC Driver Vender </em>in the Driver class. The code of the Connect Method connects to the <em>DBServer and Creates</em> an object based on a class <em>implementation the connection</em> interfaces.</p>
<p>In order to register a driver with a driver manager.we can provide the code</p>
<p>Class.forName(oracle.jdbc,driver.OracleDriver());</p>
<p><em>//Takescare of regestring the Driver.</em></p>
<p>After executing of this code class is loaded in memory then the static block will be executed.static block consist of the code which can register the driver. It isthe responsibility of every JDBC vender to provide the static block</p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li><a href="http://www.bestjavainterviewquestions.com/final-variables-and-methods/" title="Final Variables and Methods"><img src="Array" alt="Final Variables and Methods" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/session-tracking-example-using-servlets/" title="Session Tracking Example using Servlets"><img src="Array" alt="Session Tracking Example using Servlets" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/life-cycle-of-thread/" title="Life Cycle of Thread"><img src="Array" alt="Life Cycle of Thread" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/making-a-frame-non-resizable-in-java/" title="Making a Frame Non-Resizable in Java "><img src="Array" alt="Making a Frame Non-Resizable in Java " /></a></li><li><a href="http://www.bestjavainterviewquestions.com/java-thread-questions/" title="Java Thread Questions"><img src="Array" alt="Java Thread Questions" /></a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/how-application-creates-a-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JDBC Questions</title>
		<link>http://www.bestjavainterviewquestions.com/jdbc-questions/</link>
		<comments>http://www.bestjavainterviewquestions.com/jdbc-questions/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 02:40:08 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[JAVA-JDBC Questions]]></category>
		<category><![CDATA[jdbc technical questions]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=25</guid>
		<description><![CDATA[Q) What is JDBC? A) JDBC is a layer of abstraction that allows users to choose between databases. It allows you to change to a different database engine and to write to a single API. JDBC allows you to write database applications in Java without having to concern yourself with the underlying details of a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q)    What is JDBC?</strong></p>
<p><strong>A)</strong> JDBC is a layer of abstraction that allows users to choose between databases. It allows you to change to a different database engine and to write to a single API. JDBC allows you to write database applications in Java without having to concern yourself with the underlying details of a particular database.</p>
<p><strong>Q)    What are the two major components of JDBC?<br />
A)</strong> One implementation interface for database manufacturers, the other implementation interface for application and applet writers.</p>
<p><strong></strong>The JDBC Driver interface provides vendor-specific implementations of the abstract classes provided by the JDBC API. Each vendors driver must provide implementations of the java.sql.Connection,Statement,PreparedStatement, CallableStatement, ResultSet and Driver.</p>
<p><strong>Q)    What are the common tasks of JDBC?<br />
A)</strong></p>
<p>•    Create an instance of a JDBC driver or load JDBC drivers through jdbc.drivers<br />
•    Register a driver<br />
•    Specify a database<br />
•    Open a database connection<br />
•    Submit a query<br />
•    Receive results</p>
<p><strong>Q)    What packages are used by JDBC?<br />
</strong></p>
<p><strong>A)</strong>There are 8 packages: java.sql.Driver, Connection,Statement, PreparedStatement, CallableStatement, ResultSet, ResultSetMetaData, DatabaseMetaData.</p>
<p><strong>Q)    What are the flow statements of JDBC?<br />
A)</strong> A URL string &#8211;&gt;getConnection&#8211;&gt;DriverManager&#8211;&gt;Driver&#8211;&gt;Connection&#8211;&gt;Statement&#8211;&gt;executeQuery&#8211;&gt;ResultSet.</p>
<p><strong>Q)    What are the steps involved in establishing a connection?<br />
A)</strong> This involves two steps: (1) loading the driver and (2) making the connection.</p>
<p><strong>Q)    How can you load the drivers?<br />
A)</strong> Loading the driver or drivers you want to use is very simple and involves just one line of code. If, for example, you want to use the JDBC-ODBC Bridge driver, the following code will load it:<br />
Eg.<br />
Class.forName(&#8220;sun.jdbc.odbc.JdbcOdbcDriver&#8221;);<br />
Your driver documentation will give you the class name to use. For instance, if the class name is jdbc.DriverXYZ , you would load the driver with the following line of code:<br />
E.g.<br />
Class.forName(&#8220;jdbc.DriverXYZ&#8221;);</p>
<p><strong>Q)    What Class.forName will do while loading drivers?<br />
A)</strong> It is used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.<br />
From api:<br />
When a Driver class is loaded, it should create an instance of itself and register it with the DriverManager. This means that a user can load and register a driver by calling<br />
Class.forName(&#8220;foo.bah.Driver&#8221;)</p>
<p><strong>Q)    How can you make the connection?<br />
A)</strong> In establishing a connection is to have the appropriate driver connect to the DBMS. The following line of code illustrates the general idea:<br />
E.g.<br />
String url = &#8220;jdbc:odbc:Fred&#8221;;<br />
Connection con = DriverManager.getConnection(url, &#8220;Fernanda&#8221;, &#8220;J8&#8243;);</p>
<p><strong>Q)    How can you create JDBC statements?<br />
A)</strong> A Statement object is what sends your SQL statement to the DBMS. You simply create a Statement object and then execute it, supplying the appropriate execute method with the SQL statement you want to send. For a SELECT statement, the method to use is executeQuery. For statements that create or modify tables, the method to use is executeUpdate. E.g. It takes an instance of an active connection to create a Statement object. In the following example, we use our Connection object con to create the Statement object stmt :<br />
Statement stmt = con.createStatement();</p>
<p><strong>Q)    How can you retrieve data from the ResultSet?<br />
A)</strong> First JDBC returns results in a ResultSet object, so we need to declare an instance of the class ResultSet to hold our results. The following code demonstrates declaring the ResultSet object rs.<br />
E.g.<br />
ResultSet rs = stmt.executeQuery(&#8220;SELECT COF_NAME, PRICE FROM COFFEES&#8221;);</p>
<p>Second:<br />
String s = rs.getString(&#8220;COF_NAME&#8221;);<br />
The method getString is invoked on the ResultSet object rs , so getString will retrieve (get) the value stored in the column COF_NAME in the current row of rs</p>
<p><strong>Q)    What are the different types of Statements?<br />
A)</strong></p>
<p>1.Statement (use createStatement method)</p>
<p>2. Prepared Statement (Use prepareStatement method) and</p>
<p>3. Callable Statement (Use prepareCall)</p>
<p><strong>Q)    How can you use PreparedStatement?<br />
A)</strong> This special type of statement is derived from the more general class, Statement. If you want to execute a Statement object many times, it will normally reduce execution time to use a PreparedStatement object instead. The advantage to this is that in most cases, this SQL statement will be sent to the DBMS right away, where it will be compiled. As a result, the PreparedStatement object contains not just an SQL statement, but an SQL statement that has been precompiled. This means that when the PreparedStatement is executed, the DBMS can just run the PreparedStatement &#8216;s SQL statement without having to compile it first.<br />
E.g.<br />
PreparedStatement updateSales = con.prepareStatement(&#8220;UPDATE COFFEES SET SALES = ? WHERE COF_NAME LIKE ?&#8221;);</p>
<p><strong>Q)    How to call a Stored Procedure from JDBC?<br />
A)</strong> The first step is to create a CallableStatement object. As with Statement an and PreparedStatement objects, this is done with an open Connection object. A CallableStatement object contains a call to a stored procedure;<br />
E.g.<br />
CallableStatement cs = con.prepareCall(&#8220;{call SHOW_SUPPLIERS}&#8221;);<br />
ResultSet rs = cs.executeQuery();</p>
<p><strong>Q)    How to Retrieve Warnings?<br />
A)</strong> SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as planned. A warning can be reported on a Connection object, a Statement object (including PreparedStatement and CallableStatement objects), or a ResultSet object. Each of these classes has a getWarnings method, which you must invoke in order to see the first warning reported on the calling object<br />
E.g.<br />
SQLWarning warning = stmt.getWarnings();<br />
if (warning != null) {</p>
<p>while (warning != null) {<br />
System.out.println(&#8220;Message: &#8221; + warning.getMessage());<br />
System.out.println(&#8220;SQLState: &#8221; + warning.getSQLState());<br />
System.out.print(&#8220;Vendor error code: &#8220;);<br />
System.out.println(warning.getErrorCode());<br />
warning = warning.getNextWarning();<br />
}<br />
}</p>
<p><strong>Q)    How to Make Updates to Updatable Result Sets?<br />
A)</strong> Another new feature in the JDBC 2.0 API is the ability to update rows in a result set using methods in the Java programming language rather than having to send an SQL command. But before you can take advantage of this capability, you need to create a ResultSet object that is updatable. In order to do this, you supply the ResultSet constant CONCUR_UPDATABLE to the createStatement method.<br />
E.g.<br />
Connection con = DriverManager.getConnection(&#8220;jdbc:mySubprotocol:mySubName&#8221;);<br />
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,<br />
ResultSet.CONCUR_UPDATABLE);<br />
ResultSet uprs = (&#8220;SELECT COF_NAME, PRICE FROM COFFEES&#8221;);</p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li><a href="http://www.bestjavainterviewquestions.com/define-ejb-frame-work/" title="Define EJB frame work"><img src="Array" alt="Define EJB frame work" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/how-to-make-a-class-serializable/" title="How to Make a Class Serializable"><img src="Array" alt="How to Make a Class Serializable" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/defining-life-cycle-of-thread/" title="Defining Life Cycle of Thread"><img src="Array" alt="Defining Life Cycle of Thread" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/define-jsp/" title="Define JSP"><img src="Array" alt="Define JSP" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/java-multi-thread-questions/" title="Java Multi-Thread Questions"><img src="Array" alt="Java Multi-Thread Questions" /></a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/jdbc-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java-Jdbc Questions</title>
		<link>http://www.bestjavainterviewquestions.com/java-jdbc-questions/</link>
		<comments>http://www.bestjavainterviewquestions.com/java-jdbc-questions/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:59:48 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[JAVA-JDBC Questions]]></category>
		<category><![CDATA[jdbc interview quesitons]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=22</guid>
		<description><![CDATA[Q)  What&#8217;s the JDBC 3.0 API? A)  The JDBC 3.0 API is the latest update of the JDBC API. It contains many features, including scrollable result sets and the SQL:1999 data types. Q)  Does the JDBC-ODBC Bridge support the new features in the JDBC 3.0 API? A)  The JDBC-ODBC Bridge provides a limited subset of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q)  What&#8217;s the JDBC 3.0 API? </strong></p>
<p>A)  The JDBC 3.0 API is the latest update of the JDBC API. It contains many features, including scrollable result sets and the SQL:1999 data types.</p>
<p><strong>Q)  Does the JDBC-ODBC Bridge support the new features in the JDBC 3.0 API? </strong></p>
<p>A)  The JDBC-ODBC Bridge provides a limited subset of the JDBC 3.0 API.</p>
<p><strong>Q)  Can the JDBC-ODBC Bridge be used with applets?</strong></p>
<p>A)  Use of the JDBC-ODBC bridge from an untrusted applet running in a browser, such as Netscape Navigator, isn&#8217;t allowed. The JDBC-ODBC bridge doesn&#8217;t allow untrusted code to call it for security reasons. This is good because it means that an untrusted applet that is downloaded by the browser can&#8217;t circumvent Java security by calling ODBC. Remember that ODBC is native code, so once ODBC is called the Java programming language can&#8217;t guarantee that a security violation won&#8217;t occur. On the other hand, Pure Java JDBC drivers work well with applets. They are fully downloadable and do not require any client-side configuration.<br />
Finally, we would like to note that it is possible to use the JDBC-ODBC bridge with applets that will be run in appletviewer since appletviewer assumes that applets are trusted. In general, it is dangerous to turn applet security off, but it may be appropriate in certain controlled situations, such as for applets that will only be used in a secure intranet environment. Remember to exercise caution if you choose this option, and use an all-Java JDBC driver whenever possible to avoid security problems.</p>
<p><strong>Q)  How do I start debugging problems related to the JDBC API?</strong></p>
<p>A)  A good way to find out what JDBC calls are doing is to enable JDBC tracing. The JDBC trace contains a detailed listing of the activity occurring in the system that is related to JDBC operations.<br />
If you use the DriverManager facility to establish your database connection, you use the DriverManager.setLogWriter method to enable tracing of JDBC operations. If you use a DataSource object to get a connection, you use the DataSource.setLogWriter method to enable tracing. (For pooled connections, you use the ConnectionPoolDataSource.setLogWriter method, and for connections that can participate in distributed transactions, you use the XADataSource.setLogWriter method.)</p>
<p><strong>Q)  How can I use the JDBC API to access a desktop database like Microsoft Access over the network?</strong></p>
<p><strong>A) </strong> Most desktop databases currently require a JDBC solution that uses ODBC underneath. This is because the vendors of these database products haven&#8217;t implemented all-Java JDBC drivers.<br />
The best approach is to use a commercial JDBC driver that supports ODBC and the database you want to use. See the JDBC drivers page for a list of available JDBC drivers.<br />
The JDBC-ODBC bridge from Sun&#8217;s Java Software does not provide network access to desktop databases by itself. The JDBC-ODBC bridge loads ODBC as a local DLL, and typical ODBC drivers for desktop databases like Access aren&#8217;t networked. The JDBC-ODBC bridge can be used together with the RMI-JDBC bridge, however, to access a desktop database like Access over the net. This RMI-JDBC-ODBC solution is free.<br />
<strong></strong></p>
<p><strong>Q)  What JDBC technology-enabled drivers are available?</strong></p>
<p><strong>A)</strong> See our web page on JDBC technology-enabled drivers for a current listing.</p>
<p><strong>Q)  What documentation is available for the JDBC API? </strong></p>
<p><strong>A)</strong> See the JDBC technology home page for links to information about JDBC technology. This page links to information about features and benefits, a list of new features, a section on getting started, online tutorials, a section on driver requirements, and other information in addition to the specifications and javadoc documentation.</p>
<p><strong>Q)  Are there any ODBC drivers that do not work with the JDBC-ODBC Bridge?</strong><br />
<strong></strong></p>
<p><strong>A)</strong> Most ODBC 2.0 drivers should work with the Bridge. Since there is some variation in functionality between ODBC drivers, the functionality of the bridge may be affected. The bridge works with popular PC databases, such as Microsoft Access and FoxPro.<br />
<strong></strong></p>
<p><strong>Q)  What causes the &#8220;No suitable driver&#8221; error?</strong></p>
<p><strong>A)</strong> &#8220;No suitable driver&#8221; is an error that usually occurs during a call to the DriverManager.getConnection method. The cause can be failing to load the appropriate JDBC drivers before calling the getConnection method, or it can be specifying an invalid JDBC URL&#8211;one that isn&#8217;t recognized by your JDBC driver. Your best bet is to check the documentation for your JDBC driver or contact your JDBC driver vendor if you suspect that the URL you are specifying is not being recognized by your JDBC driver.<br />
In addition, when you are using the JDBC-ODBC Bridge, this error can occur if one or more the the shared libraries needed by the Bridge cannot be loaded. If you think this is the cause, check your configuration to be sure that the shared libraries are accessible to the Bridge.</p>
<p><strong>Q)  Why isn&#8217;t the java.sql.DriverManager class being found?</strong></p>
<p><strong>A)</strong> This problem can be caused by running a JDBC applet in a browser that supports the JDK 1.0.2, such as Netscape Navigator 3.0. The JDK 1.0.2 does not contain the JDBC API, so the DriverManager class typically isn&#8217;t found by the Java virtual machine running in the browser.<br />
Here&#8217;s a solution that doesn&#8217;t require any additional configuration of your web clients. Remember that classes in the java.* packages cannot be downloaded by most browsers for security reasons. Because of this, many vendors of all-Java JDBC drivers supply versions of the java.sql.* classes that have been renamed to jdbc.sql.*, along with a version of their driver that uses these modified classes. If you import jdbc.sql.* in your applet code instead of java.sql.*, and add the jdbc.sql.* classes provided by your JDBC driver vendor to your applet&#8217;s codebase, then all of the JDBC classes needed by the applet can be downloaded by the browser at run time, including the DriverManager class.<br />
This solution will allow your applet to work in any client browser that supports the JDK 1.0.2. Your applet will also work in browsers that support the JDK 1.1, although you may want to switch to the JDK 1.1 classes for performance reasons. Also, keep in mind that the solution outlined here is just an example and that other solutions are possible.</p>
<p><strong>Q)  How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?</strong><br />
<strong></strong></p>
<p><strong>A)</strong> The ResultSet.getXXX methods are the only way to retrieve data from a ResultSet object, which means that you have to make a method call for each column of a row. It is unlikely that this is the cause of a performance problem, however, because it is difficult to see how a column could be fetched without at least the cost of a function call in any scenario. We welcome input from developers on this issue.</p>
<p><strong>Q)  Why does the ODBC driver manager return &#8216;Data source name not found and no default driver specified Vendor: 0&#8242;<br />
</strong></p>
<p><strong>A)</strong> This type of error occurs during an attempt to connect to a database with the bridge. First, note that the error is coming from the ODBC driver manager. This indicates that the bridge-which is a normal ODBC client-has successfully called ODBC, so the problem isn&#8217;t due to native libraries not being present. In this case, it appears that the error is due to the fact that an ODBC DSN (data source name) needs to be configured on the client machine. Developers often forget to do this, thinking that the bridge will magically find the DSN they configured on their remote server machine</p>
<p><strong>Q)  Are all the required JDBC drivers to establish connectivity to my database part of the JDK?<br />
</strong></p>
<p><strong>A)</strong> No. There aren&#8217;t any JDBC technology-enabled drivers bundled with the JDK 1.1.x or Java 2 Platform releases other than the JDBC-ODBC Bridge. So, developers need to get a driver and install it before they can connect to a database. We are considering bundling JDBC technology- enabled drivers in the future.</p>
<p><strong>Q)  Is the JDBC-ODBC Bridge multi-threaded?<br />
</strong></p>
<p><strong>A)</strong> No. The JDBC-ODBC Bridge does not support concurrent access from different threads. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won&#8217;t get the advantages of multi-threading. In addition, deadlocks can occur between locks held in the database and the semaphore used by the Bridge. We are thinking about removing the synchronized methods in the future. They were added originally to make things simple for folks writing Java programs that use a single-threaded ODBC driver.</p>
<p><strong>Q)  Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?<br />
</strong></p>
<p><strong>A)</strong> No. You can open only one Statement object per connection when you are using the JDBC-ODBC Bridge.</p>
<p><strong>Q)  Why can&#8217;t I invoke the ResultSet methods afterLast and beforeFirst when the method next works?<br />
</strong></p>
<p><strong>A)</strong> You are probably using a driver implemented for the JDBC 1.0 API. You need to upgrade to a JDBC 2.0 driver that implements scrollable result sets. Also be sure that your code has created scrollable result sets and that the DBMS you are using supports them.</p>
<p><strong>Q)  How can I retrieve a String or other object type without creating a new object each time?</strong><br />
<strong></strong></p>
<p><strong>A)</strong> Creating and garbage collecting potentially large numbers of objects (millions) unnecessarily can really hurt performance. It may be better to provide a way to retrieve data like strings using the JDBC API without always allocating a new object.<br />
We are studying this issue to see if it is an area in which the JDBC API should be improved. Stay tuned, and please send us any comments you have on this question.</p>
<p><strong>Q)  There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?</strong></p>
<p><strong>A)</strong> No, but it is easy to find the number of rows. If you are using a scrollable result set, rs, you can call the methods rs.last and then rs.getRow to find out how many rows rs has. If the result is not scrollable, you can either count the rows by iterating through the result set or get the number of rows by submitting a query with a COUNT column in the SELECT clause.<br />
<strong></strong></p>
<p><strong>Q)  I would like to download the JDBC-ODBC Bridge for the Java 2 SDK, Standard Edition (formerly JDK 1.2). I&#8217;m a beginner with the JDBC API, and I would like to start with the Bridge. How do I do it?</strong><br />
<strong></strong></p>
<p><strong>A)</strong> The JDBC-ODBC Bridge is bundled with the Java 2 SDK, Standard Edition, so there is no need to download it separately.</p>
<p><strong>Q)  If I use the JDBC API, do I have to use ODBC underneath?</strong><br />
<strong></strong></p>
<p><strong>A)</strong> No, this is just one of many possible solutions. We recommend using a pure Java JDBC technology-enabled driver, type 3 or 4, in order to get all of the benefits of the Java programming language and the JDBC API.</p>
<p><strong>Q)  Once I have the Java 2 SDK, Standard Edition, from Sun, what else do I need to connect to a database?</strong></p>
<p><strong>A)</strong> You still need to get and install a JDBC technology-enabled driver that supports the database that you are using. There are many drivers available from a variety of sources. You can also try using the JDBC-ODBC Bridge if you have ODBC connectivity set up already. The Bridge comes with the Java 2 SDK, Standard Edition, and Enterprise Edition, and it doesn&#8217;t require any extra setup itself. The Bridge is a normal ODBC client. Note, however, that you should use the JDBC-ODBC Bridge only for experimental prototyping or when you have no other driver available.</p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li><a href="http://www.bestjavainterviewquestions.com/define-nullpointerexception/" title="Define NullPointerException"><img src="Array" alt="Define NullPointerException" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/difference-between-print-and-println-methods-in-java/" title="Difference between Print() and Println() Methods in Java"><img src="Array" alt="Difference between Print() and Println() Methods in Java" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/java-swings-interview-questions-2/" title="Java Swings Interview Questions"><img src="Array" alt="Java Swings Interview Questions" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/marking-or-tagging-interface/" title="Marking or Tagging Interface"><img src="Array" alt="Marking or Tagging Interface" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/explain-executequery-method/" title="Explain executeQuery Method"><img src="Array" alt="Explain executeQuery Method" /></a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/java-jdbc-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
