is it possible to use type1 driver in web application?
if so give me an example....
Printable View
is it possible to use type1 driver in web application?
if so give me an example....
Hello ,
Geek members ,hai!.
Please send me the interview Q&A
forsolving java programs .
Yes you can use Type1 Driver in Web Applications
the example is following:-
Make a database in MS Access or in MS Excel and use it as a database
suppose u have made a table say "Table1" in MS Access database say "db1" and DSN is "MyAccess" then this programme will help you
<%@ page import="java.sql.*" %>
<html>
<body>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:MyAccess");
Statement stmt=conn.createStatement();
ResultSet result=stmt.executeQuery("select * from Table1");
while(result.next())
{
out.println(result.getType(Column-name)+..............)
}
%>
</body>
</html>
Hi Nikhil,
u r absolutely right.........
Type 1 driver can be used in web application.
The example is good.......
Regards,
riju