Skip to Content.
Sympa Menu

freetds - Help: Error - "reflective access to class java.sql.Statement prohibited"

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brown, John" <JABrown AT comdt.uscg.mil>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Help: Error - "reflective access to class java.sql.Statement prohibited"
  • Date: Tue, 17 Apr 2001 16:21:02 -0400


I've been searching for an example applet that uses the FreeTDS driver -
but haven't found one yet - just applications.

Suggestions welcome.

I'm trying to test FreeTDS with IIs v.4 - and I've posted a sample applet
at : http://38.144.154.100/legal/applets/test_tds_driverII.htm

I am getting an error that I hope somebody can help me with:
reflective access to class java.sql.Statement prohibited

The code that I expect is causing this is below: (suspect code
hightlighted in bold)
======================================================
void getRecords(String SQL) {
Properties props=new Properties();

try {
Class.forName("com.internetcds.jdbc.tds.Driver").newInstance();
} catch (Exception e) {
StatusLabel.setText("Failed to load JDBC/ODBC driver.");
System.out.println(e.getMessage());
System.out.println(e.toString());
e.printStackTrace();
return;
}

try {
Connection connection = Common.getConnection();
<b>Statement</b> statement=connection.createStatement();
int columns=0;
int pos=0;
SessionTable.clear();
String output="";
//execute list function
<b>ResultSet</b> rs = statement.executeQuery(SQL);
<b>ResultSetMetaData</b> md = rs.getMetaData();
columns=rs.getMetaData().getColumnCount();
================================================================
I made this code mostly from looking at the example applications (would
have used an applet version but I found none). I've imported java.sql.* -
and I think that my calls above to <b>ResultSet, Statement, and
ResultSetMetaData</b> are the problem. I just don't know how to fix.

Thanks!




  • Help: Error - "reflective access to class java.sql.Statement prohibited", Brown, John, 04/17/2001

Archive powered by MHonArc 2.6.24.

Top of Page