Howdy, Stranger!

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

Categories

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

  • sonoroussonorous Member Posts: 1
    : 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
  • Justin BibJustin Bib USAMember Posts: 0

    ___ < http://forcoder.org /> free ebooks and video tutorials about < JavaScript Delphi Python MATLAB PHP C# C++ Ruby R Java C Visual Basic Swift Perl Objective-C Go Visual Basic .NET Scratch Assembly PL/SQL Alice LabVIEW Prolog Bash Apex Rust Julia Clojure Crystal VBScript Transact-SQL Erlang Scheme ABAP Scala Kotlin Awk Hack Lisp SAS COBOL Fortran Lua ML D FoxPro Ada F# Dart Logo /> _____

Sign In or Register to comment.