Newbie on JDBC-ODBC Connection..HELP!!

There seem to be problem each time I need to get and also input the data from a form to a database. The error msg will always be
that they will ask me to check my database... "Internal test driver incomplete. The drive may not support the DatabaseMetadata
methods.." Can anybody help me? Here are a sample of my codes to connect to the database:


<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:sunpartner", "", "");

Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery ("Select CoName From Company");
while(rs.next()){
%>
"><%= rs.getString("CoName")%>

<% }
if (rs!=null) rs.close();
if (stmt!=null) stmt.close();
if (con!=null) con.close();
%>


Thanks..I'd really appreciate the help as I have less than a week till my exams....

Comments

  • : There seem to be problem each time I need to get and also input the
    : data from a form to a database. The error msg will always be
    : that they will ask me to check my database... "Internal test driver
    : incomplete. The drive may not support the DatabaseMetadata
    : methods.." Can anybody help me? Here are a sample of my codes to
    : connect to the database:
    :
    :
    : <%
    : Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    : Connection con =
    : DriverManager.getConnection("jdbc:odbc:sunpartner", "", "");
    :
    : Statement stmt = con.createStatement();
    : ResultSet rs = stmt.executeQuery ("Select CoName From Company");
    : while(rs.next()){
    : %>
    : "><%=
    : rs.getString("CoName")%>
    :
    : <% }
    : if (rs!=null) rs.close();
    : if (stmt!=null) stmt.close();
    : if (con!=null) con.close();
    : %>
    :
    :
    : Thanks..I'd really appreciate the help as I have less than a week
    : till my exams....
    :
    The problem may be the non connectivity of jdbc-odbc driver !!
    try to make a new connection and the desired result
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion