× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: JDBC security access failure
  • From: "Barla Ramesh Reddy, Gurgaon" <ramesh@xxxxxxxxxxxxxxx>
  • Date: Fri, 10 Mar 2000 15:05:24 +0530




> -----Original Message-----
> From: Srinivas S S, Gurgaon 
> Sent: Friday, March 10, 2000 2:55 PM
> To:   Barla Ramesh Reddy, Gurgaon
> Subject:      
> 
> Following is the problem
>  I have a java applet which uses JDBC to retreive data from a Microsoft
> Access database on the local machine and populate a list box.
> I have configured the DSN to access the Workalloc.mdb.
> I keep getting the following runtime error when i run the applet.
> 
> If I run the same program on other PC its working fine. What could be the
> problem with my PC.Is it related to any security features in Java?
> 
> Can anybody help me?
I am sending the program also.



 <<TeamMnt.txt>> 

>  <<...>> 
> 
> 
>  
import java.awt.*;
import java.applet.*;
import java.sql.*;

public class TeamMnt extends Applet 
{
List project = new List(10,false);
List teammbr = new List(10,false);
public void init()
{
setLayout(new GridLayout(3,1,10,10));
Panel p1 = new Panel();
Panel p2 = new Panel();
Panel p3 = new Panel();
Label title = new Label("Project Team Maintenance");
add(p1);
add(p2);
add(p3);
Button addmbr = new Button("Add");
Button rmvmbr = new Button("Delete");
Button exit = new Button("Exit");
p1.add(title);
p2.add(project);
p2.add(teammbr);
p3.add(addmbr);
p3.add(rmvmbr);
p3.add(exit);
initConnection();
}
public void initConnection() 
{
try
{
        String str1 = "jdbc:odbc:workalloc";
        Connection c = null;
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        c = DriverManager.getConnection(str1,"srini","heaven");
        Statement s = c.createStatement();
        ResultSet r = s.executeQuery("SELECT PROJECT FROM PROJECT ORDER BY 
PROJECT");
        while(r.next())
        {
        project.addItem(r.getString("PROJECT"));
        }

        //s.close();

}
catch(Exception e)
{
        e.printStackTrace();
        System.out.println("Connection failed");
}


}
}



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.