pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC APPLET Problem
13+ messages / 5 participants
[nested] [flat]

* JDBC APPLET Problem
@ 2001-02-01 13:16 v j <jvs_a@yahoo.com>
  2001-02-01 23:32 ` Re: JDBC APPLET Problem Bruno Dickhoff <bruno@dickhoff.de>
  2001-02-02 05:11 ` Re: JDBC APPLET Problem PostgreSQL Server <postgres@gonzo.lnxsoftware.com.mx>
  2001-02-02 05:21 ` Re: JDBC APPLET Problem S.A.Pamungkas <moenk_2000@yahoo.com>
  2001-02-02 08:38 ` Re: [INTERFACES] JDBC APPLET Problem Peter T Mount <peter@retep.org.uk>
  0 siblings, 4 replies; 13+ messages in thread

From: v j @ 2001-02-01 13:16 UTC (permalink / raw)
  To: pgsql-interfaces

Dear Sir,
 Now I try to run the Java Program by using JDBC
PostgreSql through Web Browser.
I set the file pg_hba.conf as

local  all                                   trust
host   all   127.0.0.1   255.255.255.255     trust
host   all     0.0.0.0           0.0.0.0     trust

and the java code as shown below .....

 import java.sql.*;
 import java.applet.*;
 import java.awt.*;
 import java.awt.event.*;
 import java.net.*;
 import java.io.*;


public class SampleApplet extends Applet implements
ActionListener 
{
  	Connection conn;
  	Statement stmt;
	String state_code;
	
         private TextField Tinput;
	private TextField Toutput;
	private TextField Terror;
    
         private Button sqlprocess;
	
	
        
   public void init(){
	   
	   
	   	try{ Class.forName  ("org.postgresql.Driver");}
		catch(Exception ex){
			ex.printStackTrace();}
		
		setFont(new Font("TimesRoman",Font.PLAIN,15));
		setLayout(null);
		
		Label Linput = new Label("Enter a state code: ");
		Tinput = new TextField(10);
		Label Loutput = new Label("Sql Output");
		Toutput = new TextField(30);
		Terror = new TextField(100);
		sqlprocess = new Button("SqlQuery");
		
		Linput.setBounds(10,30,150,30);
		Tinput.setBounds(170,20,100,30);
		Loutput.setBounds(10,80,100,30);
		Toutput.setBounds(110,80,100,30);
		Terror.setBounds(10,150,200,30);
		sqlprocess.setBounds(50,210,80,30);
		
		add(Linput);
		add(Tinput);
		add(Loutput);
		add(Toutput);
		add(Terror);
		add(sqlprocess);
		
		sqlprocess.addActionListener(this);

   }	      
	   
   public void start() {
	   try{ conn =
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
			stmt = conn.createStatement();				
	   }
		catch(Exception ex){
			
			ex.printStackTrace();
			Terror.setText(ex.getMessage());
		        }			
   }	
   
    public void actionPerformed(ActionEvent ae) {
        
	   if(ae.getActionCommand()=="SqlQuery"){
         
	     
		   state_code = Tinput.getText();
		   
		   try{ ResultSet res = stmt.executeQuery( "Select
name "+"From statename "+"Where code =
'"+state_code+"'");
				if(res!=null)
				while(res.next())
					{String state_name = res.getString(1);
					Toutput.setText(state_name);}
		
				res.close();
				stmt.close();
				conn.close();
		   }
		   
		   catch(Exception ex){
			   ex.printStackTrace(); }
			
		     
       }
	   
	}  
    
    
}

and I get the error message as

"No suitable driver"

Please advice me for this problem.

Thank you
  


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: JDBC APPLET Problem
  2001-02-01 13:16 JDBC APPLET Problem v j <jvs_a@yahoo.com>
@ 2001-02-01 23:32 ` Bruno Dickhoff <bruno@dickhoff.de>
  3 siblings, 0 replies; 13+ messages in thread

From: Bruno Dickhoff @ 2001-02-01 23:32 UTC (permalink / raw)
  To: v j <jvs_a@yahoo.com>; +Cc: pgsql-interfaces

Hello v,

Thursday, February 01, 2001, 2:16:10 PM, you wrote:

vj>    public void start() {
vj>            try{ conn =
vj> DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
vj>                         stmt = conn.createStatement();                          
vj>            }

Maybe you forgot to load the driver?

Excerpt from the SUN docs:
------------------------
Loading Drivers
Loading the driver or drivers you want to use is very simple and involves just one line of code. If, for example, you want to use the JDBC-ODBC Bridge driver, the following code will load it:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Your driver documentation will give you the class name to use. For instance, if the class name is jdbc.DriverXYZ , you would load the driver with the following line of code:

Class.forName("jdbc.DriverXYZ");

You do not need to create an instance of a driver and register it with the DriverManager because calling Class.forName will do that for you automatically. If you were to create your own instance, you would be creating an unnecessary duplicate, but it would do no harm.

When you have loaded a driver, it is available for making a connection with a DBMS. 
-------------

-- 
Best regards,
 Bruno                            mailto:bruno@dickhoff.de





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: JDBC APPLET Problem
  2001-02-01 13:16 JDBC APPLET Problem v j <jvs_a@yahoo.com>
@ 2001-02-02 05:11 ` PostgreSQL Server <postgres@gonzo.lnxsoftware.com.mx>
  2001-02-02 06:22   ` Re: JDBC APPLET Problem v j <jvs_a@yahoo.com>
  3 siblings, 1 reply; 13+ messages in thread

From: PostgreSQL Server @ 2001-02-02 05:11 UTC (permalink / raw)
  To: v j <jvs_a@yahoo.com>; +Cc: pgsql-interfaces

On Thu, 1 Feb 2001, v j wrote:

> Dear Sir,
>  Now I try to run the Java Program by using JDBC
> PostgreSql through Web Browser.
> I set the file pg_hba.conf as
> 
> local  all                                   trust
> host   all   127.0.0.1   255.255.255.255     trust
> host   all     0.0.0.0           0.0.0.0     trust
> 
> and the java code as shown below .....
> 
>  import java.sql.*;
>  import java.applet.*;
>  import java.awt.*;
>  import java.awt.event.*;
>  import java.net.*;
>  import java.io.*;
> 
> 
> public class SampleApplet extends Applet implements
> ActionListener 
> {
>   	Connection conn;
>   	Statement stmt;
> 	String state_code;
> 	
>          private TextField Tinput;
> 	private TextField Toutput;
> 	private TextField Terror;
>     
>          private Button sqlprocess;
> 	
> 	
>         
>    public void init(){
> 	   
> 	   
> 	   	try{ Class.forName  ("org.postgresql.Driver");}
> 		catch(Exception ex){
> 			ex.printStackTrace();}
> 		
> 		setFont(new Font("TimesRoman",Font.PLAIN,15));
> 		setLayout(null);
> 		
> 		Label Linput = new Label("Enter a state code: ");
> 		Tinput = new TextField(10);
> 		Label Loutput = new Label("Sql Output");
> 		Toutput = new TextField(30);
> 		Terror = new TextField(100);
> 		sqlprocess = new Button("SqlQuery");
> 		
> 		Linput.setBounds(10,30,150,30);
> 		Tinput.setBounds(170,20,100,30);
> 		Loutput.setBounds(10,80,100,30);
> 		Toutput.setBounds(110,80,100,30);
> 		Terror.setBounds(10,150,200,30);
> 		sqlprocess.setBounds(50,210,80,30);
> 		
> 		add(Linput);
> 		add(Tinput);
> 		add(Loutput);
> 		add(Toutput);
> 		add(Terror);
> 		add(sqlprocess);
> 		
> 		sqlprocess.addActionListener(this);
> 
>    }	      
> 	   
>    public void start() {
> 	   try{ conn =
> DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> 			stmt = conn.createStatement();				
> 	   }
> 		catch(Exception ex){
> 			
> 			ex.printStackTrace();
> 			Terror.setText(ex.getMessage());
> 		        }			
>    }	
>    
>     public void actionPerformed(ActionEvent ae) {
>         
> 	   if(ae.getActionCommand()=="SqlQuery"){
>          
> 	     
> 		   state_code = Tinput.getText();
> 		   
> 		   try{ ResultSet res = stmt.executeQuery( "Select
> name "+"From statename "+"Where code =
> '"+state_code+"'");
> 				if(res!=null)
> 				while(res.next())
> 					{String state_name = res.getString(1);
> 					Toutput.setText(state_name);}
> 		
> 				res.close();
> 				stmt.close();
> 				conn.close();
> 		   }
> 		   
> 		   catch(Exception ex){
> 			   ex.printStackTrace(); }
> 			
> 		     
>        }
> 	   
> 	}  
>     
>     
> }
> 
> and I get the error message as
> 
> "No suitable driver"
> 
> Please advice me for this problem.
> 
> Thank you
>   
> 
> 
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> 




Hello there :

You need to include your .jar archive with your applet

Just copy the jdbc jar to your applet directory 


<html>
<body
<applet code=SampleApplet archive=jdbc7.0-1.2.jar  width=800 height=600>
</applet>
</body>
</html>




Saludos 


Leonel





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: JDBC APPLET Problem
  2001-02-01 13:16 JDBC APPLET Problem v j <jvs_a@yahoo.com>
  2001-02-02 05:11 ` Re: JDBC APPLET Problem PostgreSQL Server <postgres@gonzo.lnxsoftware.com.mx>
@ 2001-02-02 06:22   ` v j <jvs_a@yahoo.com>
  0 siblings, 0 replies; 13+ messages in thread

From: v j @ 2001-02-02 06:22 UTC (permalink / raw)
  To: pgsql-interfaces

Dear Sir,
  Thanks you for everybody for advicing me..
  I've already tried to include both jdbc7.0-1.2.jar
and postgresql.jar  archive with my applet and then
copy the jdbc7.0-1.2.jar and postgresql.jar file into
public_html directory(which is the location of
SampleApplet.class file)  and try to run the applet
through web browser again and the error message still
shown "No suitable driver".. how should I do more 

Thanks you
J. V.

--- PostgreSQL Server
<postgres@gonzo.lnxsoftware.com.mx> wrote:
> On Thu, 1 Feb 2001, v j wrote:
> 
> > Dear Sir,
> >  Now I try to run the Java Program by using JDBC
> > PostgreSql through Web Browser.
> > I set the file pg_hba.conf as
> > 
> > local  all                                   trust
> > host   all   127.0.0.1   255.255.255.255     trust
> > host   all     0.0.0.0           0.0.0.0     trust
> > 
> > and the java code as shown below .....
> > 
> >  import java.sql.*;
> >  import java.applet.*;
> >  import java.awt.*;
> >  import java.awt.event.*;
> >  import java.net.*;
> >  import java.io.*;
> > 
> > 
> > public class SampleApplet extends Applet
> implements
> > ActionListener 
> > {
> >   	Connection conn;
> >   	Statement stmt;
> > 	String state_code;
> > 	
> >          private TextField Tinput;
> > 	private TextField Toutput;
> > 	private TextField Terror;
> >     
> >          private Button sqlprocess;
> > 	
> > 	
> >         
> >    public void init(){
> > 	   
> > 	   
> > 	   	try{ Class.forName 
> ("org.postgresql.Driver");}
> > 		catch(Exception ex){
> > 			ex.printStackTrace();}
> > 		
> > 		setFont(new Font("TimesRoman",Font.PLAIN,15));
> > 		setLayout(null);
> > 		
> > 		Label Linput = new Label("Enter a state code:
> ");
> > 		Tinput = new TextField(10);
> > 		Label Loutput = new Label("Sql Output");
> > 		Toutput = new TextField(30);
> > 		Terror = new TextField(100);
> > 		sqlprocess = new Button("SqlQuery");
> > 		
> > 		Linput.setBounds(10,30,150,30);
> > 		Tinput.setBounds(170,20,100,30);
> > 		Loutput.setBounds(10,80,100,30);
> > 		Toutput.setBounds(110,80,100,30);
> > 		Terror.setBounds(10,150,200,30);
> > 		sqlprocess.setBounds(50,210,80,30);
> > 		
> > 		add(Linput);
> > 		add(Tinput);
> > 		add(Loutput);
> > 		add(Toutput);
> > 		add(Terror);
> > 		add(sqlprocess);
> > 		
> > 		sqlprocess.addActionListener(this);
> > 
> >    }	      
> > 	   
> >    public void start() {
> > 	   try{ conn =
> >
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> > 			stmt = conn.createStatement();				
> > 	   }
> > 		catch(Exception ex){
> > 			
> > 			ex.printStackTrace();
> > 			Terror.setText(ex.getMessage());
> > 		        }			
> >    }	
> >    
> >     public void actionPerformed(ActionEvent ae) {
> >         
> > 	   if(ae.getActionCommand()=="SqlQuery"){
> >          
> > 	     
> > 		   state_code = Tinput.getText();
> > 		   
> > 		   try{ ResultSet res = stmt.executeQuery(
> "Select
> > name "+"From statename "+"Where code =
> > '"+state_code+"'");
> > 				if(res!=null)
> > 				while(res.next())
> > 					{String state_name = res.getString(1);
> > 					Toutput.setText(state_name);}
> > 		
> > 				res.close();
> > 				stmt.close();
> > 				conn.close();
> > 		   }
> > 		   
> > 		   catch(Exception ex){
> > 			   ex.printStackTrace(); }
> > 			
> > 		     
> >        }
> > 	   
> > 	}  
> >     
> >     
> > }
> > 
> > and I get the error message as
> > 
> > "No suitable driver"
> > 
> > Please advice me for this problem.
> > 
> > Thank you
> >   
> > 
> > 
> > __________________________________________________
> > Get personalized email addresses from Yahoo! Mail
> - only $35 
> > a year!  http://personal.mail.yahoo.com/
> > 
> 
> 
> 
> 
> Hello there :
> 
> You need to include your .jar archive with your
> applet
> 
> Just copy the jdbc jar to your applet directory 
> 
> 
> <html>
> <body
> <applet code=SampleApplet archive=jdbc7.0-1.2.jar 
> width=800 height=600>
> </applet>
> </body>
> </html>
> 
> 
> 
> 
> Saludos 
> 
> 
> Leonel
> 
> 


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: JDBC APPLET Problem
  2001-02-01 13:16 JDBC APPLET Problem v j <jvs_a@yahoo.com>
@ 2001-02-02 05:21 ` S.A.Pamungkas <moenk_2000@yahoo.com>
  3 siblings, 0 replies; 13+ messages in thread

From: S.A.Pamungkas @ 2001-02-02 05:21 UTC (permalink / raw)
  To: v j <jvs_a@yahoo.com>; pgsql-interfaces

Hi VJ,

I had experience that connecting Postgresql (JDBC) by
Applet has several (many) problems. The most problem
is about driver such as "no suitable driver".

So, I decided to use Java Servlet in the server side
instead of Applet. Applet is used only in the client
side.

And Applet-Servlet-JDBC-Postgresql communication
provides good system for data collection and(or) data
retrieval (including BLOB).

Hope that this information helps you.

Regard.

-S.A.Pamungkas- 





--- v j <jvs_a@yahoo.com> wrote:
> Dear Sir,
>  Now I try to run the Java Program by using JDBC
> PostgreSql through Web Browser.
> I set the file pg_hba.conf as
> 
> local  all                                   trust
> host   all   127.0.0.1   255.255.255.255     trust
> host   all     0.0.0.0           0.0.0.0     trust
> 
> and the java code as shown below .....
> 
>  import java.sql.*;
>  import java.applet.*;
>  import java.awt.*;
>  import java.awt.event.*;
>  import java.net.*;
>  import java.io.*;
> 
> 
> public class SampleApplet extends Applet implements
> ActionListener 
> {
>   	Connection conn;
>   	Statement stmt;
> 	String state_code;
> 	
>          private TextField Tinput;
> 	private TextField Toutput;
> 	private TextField Terror;
>     
>          private Button sqlprocess;
> 	
> 	
>         
>    public void init(){
> 	   
> 	   
> 	   	try{ Class.forName  ("org.postgresql.Driver");}
> 		catch(Exception ex){
> 			ex.printStackTrace();}
> 		
> 		setFont(new Font("TimesRoman",Font.PLAIN,15));
> 		setLayout(null);
> 		
> 		Label Linput = new Label("Enter a state code: ");
> 		Tinput = new TextField(10);
> 		Label Loutput = new Label("Sql Output");
> 		Toutput = new TextField(30);
> 		Terror = new TextField(100);
> 		sqlprocess = new Button("SqlQuery");
> 		
> 		Linput.setBounds(10,30,150,30);
> 		Tinput.setBounds(170,20,100,30);
> 		Loutput.setBounds(10,80,100,30);
> 		Toutput.setBounds(110,80,100,30);
> 		Terror.setBounds(10,150,200,30);
> 		sqlprocess.setBounds(50,210,80,30);
> 		
> 		add(Linput);
> 		add(Tinput);
> 		add(Loutput);
> 		add(Toutput);
> 		add(Terror);
> 		add(sqlprocess);
> 		
> 		sqlprocess.addActionListener(this);
> 
>    }	      
> 	   
>    public void start() {
> 	   try{ conn =
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> 			stmt = conn.createStatement();				
> 	   }
> 		catch(Exception ex){
> 			
> 			ex.printStackTrace();
> 			Terror.setText(ex.getMessage());
> 		        }			
>    }	
>    
>     public void actionPerformed(ActionEvent ae) {
>         
> 	   if(ae.getActionCommand()=="SqlQuery"){
>          
> 	     
> 		   state_code = Tinput.getText();
> 		   
> 		   try{ ResultSet res = stmt.executeQuery( "Select
> name "+"From statename "+"Where code =
> '"+state_code+"'");
> 				if(res!=null)
> 				while(res.next())
> 					{String state_name = res.getString(1);
> 					Toutput.setText(state_name);}
> 		
> 				res.close();
> 				stmt.close();
> 				conn.close();
> 		   }
> 		   
> 		   catch(Exception ex){
> 			   ex.printStackTrace(); }
> 			
> 		     
>        }
> 	   
> 	}  
>     
>     
> }
> 
> and I get the error message as
> 
> "No suitable driver"
> 
> Please advice me for this problem.
> 
> Thank you
>   
> 
> 
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail -
> only $35 
> a year!  http://personal.mail.yahoo.com/


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: [INTERFACES] JDBC APPLET Problem
  2001-02-01 13:16 JDBC APPLET Problem v j <jvs_a@yahoo.com>
@ 2001-02-02 08:38 ` Peter T Mount <peter@retep.org.uk>
  2001-02-05 09:44   ` Re: [INTERFACES] JDBC APPLET Problem v j <jvs_a@yahoo.com>
  3 siblings, 1 reply; 13+ messages in thread

From: Peter T Mount @ 2001-02-02 08:38 UTC (permalink / raw)
  To: v j <jvs_a@yahoo.com>; +Cc: pgsql-jdbc@postgresql.org

Quoting v j <jvs_a@yahoo.com>:

redirecting to jdbc list...

> Dear Sir,
>  Now I try to run the Java Program by using JDBC
> PostgreSql through Web Browser.
> I set the file pg_hba.conf as

[snip]

> and I get the error message as
> 
> "No suitable driver"
> 
> Please advice me for this problem.

Ok, no suitable driver implies one of two possibilities.

1: You are not loading the driver using Class.forname("org.postgresql.Driver");

2: The url is wrong.

Looking at it #1 is your problem.

PS: There is a #3, Internet Explorer has a bug that prevents any JDBC from 
working ;-)

Peter

> 
> Thank you
>   
> 
> 
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> 



-- 
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: [INTERFACES] JDBC APPLET Problem
  2001-02-01 13:16 JDBC APPLET Problem v j <jvs_a@yahoo.com>
  2001-02-02 08:38 ` Re: [INTERFACES] JDBC APPLET Problem Peter T Mount <peter@retep.org.uk>
@ 2001-02-05 09:44   ` v j <jvs_a@yahoo.com>
  0 siblings, 0 replies; 13+ messages in thread

From: v j @ 2001-02-05 09:44 UTC (permalink / raw)
  To: pgsql-jdbc@postgresql.org

Dear everybody,

 Thank you for advicing me about running the Java
Program by using JDBC PostgreSql through Web Browser.
I would like to inform you that Now I can solve this
probem when I archive jdbc7.0-1.2.jar with my applet
and then copy the jdbc7.0-1.2.jar file and all of the
directory "org"into public_html directory.. it can
work!  :>  under Internet Explorer but for Netscape
Navigator can't run and shown message "unknown
argument" may be it has a bug that prevents any JDBC
from working as Mr.Peter T mount told..

Thanks you again :>
J.V.


--- Peter T Mount <peter@retep.org.uk> wrote:
> Quoting v j <jvs_a@yahoo.com>:
> 
> redirecting to jdbc list...
> 
> > Dear Sir,
> >  Now I try to run the Java Program by using JDBC
> > PostgreSql through Web Browser.
> > I set the file pg_hba.conf as
> 
> [snip]
> 
> > and I get the error message as
> > 
> > "No suitable driver"
> > 
> > Please advice me for this problem.
> 
> Ok, no suitable driver implies one of two
> possibilities.
> 
> 1: You are not loading the driver using
> Class.forname("org.postgresql.Driver");
> 
> 2: The url is wrong.
> 
> Looking at it #1 is your problem.
> 
> PS: There is a #3, Internet Explorer has a bug that
> prevents any JDBC from 
> working ;-)
> 
> Peter
> 
> > 
> > Thank you
> >   
> > 
> > 
> > __________________________________________________
> > Get personalized email addresses from Yahoo! Mail
> - only $35 
> > a year!  http://personal.mail.yahoo.com/
> > 
> 
> 
> 
> -- 
> Peter Mount peter@retep.org.uk
> PostgreSQL JDBC Driver:
> http://www.retep.org.uk/postgres/
> RetepPDF PDF library for Java:
http://www.retep.org.uk/pdf/


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* JDBC APPLET Problem
@ 2001-02-02 06:42 v j <jvs_a@yahoo.com>
  2001-02-05 12:11 ` Re: JDBC APPLET Problem v j <jvs_a@yahoo.com>
  0 siblings, 1 reply; 13+ messages in thread

From: v j @ 2001-02-02 06:42 UTC (permalink / raw)
  To: pgsql-interfaces

Dear Sir,
  Thanks you for everybody for advicing me..
  I've already tried to include both jdbc7.0-1.2.jar
and postgresql.jar  archive with my applet and then
copy the jdbc7.0-1.2.jar and postgresql.jar file into
public_html directory(which is the location of
SampleApplet.class file)  and try to run the applet
through web browser again and the error message still
shown "No suitable driver".. how should I do more 

Thanks you
J. V.

--- PostgreSQL Server
<postgres@gonzo.lnxsoftware.com.mx> wrote:
> On Thu, 1 Feb 2001, v j wrote:
> 
> > Dear Sir,
> >  Now I try to run the Java Program by using JDBC
> > PostgreSql through Web Browser.
> > I set the file pg_hba.conf as
> > 
> > local  all                                   trust
> > host   all   127.0.0.1   255.255.255.255     trust
> > host   all     0.0.0.0           0.0.0.0     trust
> > 
> > and the java code as shown below .....
> > 
> >  import java.sql.*;
> >  import java.applet.*;
> >  import java.awt.*;
> >  import java.awt.event.*;
> >  import java.net.*;
> >  import java.io.*;
> > 
> > 
> > public class SampleApplet extends Applet
> implements
> > ActionListener 
> > {
> >   	Connection conn;
> >   	Statement stmt;
> > 	String state_code;
> > 	
> >          private TextField Tinput;
> > 	private TextField Toutput;
> > 	private TextField Terror;
> >     
> >          private Button sqlprocess;
> > 	
> > 	
> >         
> >    public void init(){
> > 	   
> > 	   
> > 	   	try{ Class.forName 
> ("org.postgresql.Driver");}
> > 		catch(Exception ex){
> > 			ex.printStackTrace();}
> > 		
> > 		setFont(new Font("TimesRoman",Font.PLAIN,15));
> > 		setLayout(null);
> > 		
> > 		Label Linput = new Label("Enter a state code:
> ");
> > 		Tinput = new TextField(10);
> > 		Label Loutput = new Label("Sql Output");
> > 		Toutput = new TextField(30);
> > 		Terror = new TextField(100);
> > 		sqlprocess = new Button("SqlQuery");
> > 		
> > 		Linput.setBounds(10,30,150,30);
> > 		Tinput.setBounds(170,20,100,30);
> > 		Loutput.setBounds(10,80,100,30);
> > 		Toutput.setBounds(110,80,100,30);
> > 		Terror.setBounds(10,150,200,30);
> > 		sqlprocess.setBounds(50,210,80,30);
> > 		
> > 		add(Linput);
> > 		add(Tinput);
> > 		add(Loutput);
> > 		add(Toutput);
> > 		add(Terror);
> > 		add(sqlprocess);
> > 		
> > 		sqlprocess.addActionListener(this);
> > 
> >    }	      
> > 	   
> >    public void start() {
> > 	   try{ conn =
> >
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> > 			stmt = conn.createStatement();				
> > 	   }
> > 		catch(Exception ex){
> > 			
> > 			ex.printStackTrace();
> > 			Terror.setText(ex.getMessage());
> > 		        }			
> >    }	
> >    
> >     public void actionPerformed(ActionEvent ae) {
> >         
> > 	   if(ae.getActionCommand()=="SqlQuery"){
> >          
> > 	     
> > 		   state_code = Tinput.getText();
> > 		   
> > 		   try{ ResultSet res = stmt.executeQuery(
> "Select
> > name "+"From statename "+"Where code =
> > '"+state_code+"'");
> > 				if(res!=null)
> > 				while(res.next())
> > 					{String state_name = res.getString(1);
> > 					Toutput.setText(state_name);}
> > 		
> > 				res.close();
> > 				stmt.close();
> > 				conn.close();
> > 		   }
> > 		   
> > 		   catch(Exception ex){
> > 			   ex.printStackTrace(); }
> > 			
> > 		     
> >        }
> > 	   
> > 	}  
> >     
> >     
> > }
> > 
> > and I get the error message as
> > 
> > "No suitable driver"
> > 
> > Please advice me for this problem.
> > 
> > Thank you
> >   
> > 
> > 
> > __________________________________________________
> > Get personalized email addresses from Yahoo! Mail
> - only $35 
> > a year!  http://personal.mail.yahoo.com/
> > 
> 
> 
> 
> 
> Hello there :
> 
> You need to include your .jar archive with your
> applet
> 
> Just copy the jdbc jar to your applet directory 
> 
> 
> <html>
> <body
> <applet code=SampleApplet archive=jdbc7.0-1.2.jar 
> width=800 height=600>
> </applet>
> </body>
> </html>
> 
> 
> 
> 
> Saludos 
> 
> 
> Leonel
> 
> 


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: JDBC APPLET Problem
  2001-02-02 06:42 JDBC APPLET Problem v j <jvs_a@yahoo.com>
@ 2001-02-05 12:11 ` v j <jvs_a@yahoo.com>
  0 siblings, 0 replies; 13+ messages in thread

From: v j @ 2001-02-05 12:11 UTC (permalink / raw)
  To: pgsql-interfaces

Dear Sir,
 My Jdbc Applet have already run but only when I copy
the "org" directory into "Desktop" directory of my
computer, for other computer that not have "org"
directory in "Desktop" directory the applet can't run
and shown "no suitable driver" ,why??,  or this means
that archive jdbc7.0-1.2.jar in html file can't be
seen..
advice me please..

Thank you
J. V.

--- v j <jvs_a@yahoo.com> wrote:
> Dear Sir,
>   Thanks you for everybody for advicing me..
>   I've already tried to include both jdbc7.0-1.2.jar
> and postgresql.jar  archive with my applet and then
> copy the jdbc7.0-1.2.jar and postgresql.jar file
> into
> public_html directory(which is the location of
> SampleApplet.class file)  and try to run the applet
> through web browser again and the error message
> still
> shown "No suitable driver".. how should I do more 
> 
> Thanks you
> J. V.
> 
> --- PostgreSQL Server
> <postgres@gonzo.lnxsoftware.com.mx> wrote:
> > On Thu, 1 Feb 2001, v j wrote:
> > 
> > > Dear Sir,
> > >  Now I try to run the Java Program by using JDBC
> > > PostgreSql through Web Browser.
> > > I set the file pg_hba.conf as
> > > 
> > > local  all                                  
> trust
> > > host   all   127.0.0.1   255.255.255.255    
> trust
> > > host   all     0.0.0.0           0.0.0.0    
> trust
> > > 
> > > and the java code as shown below .....
> > > 
> > >  import java.sql.*;
> > >  import java.applet.*;
> > >  import java.awt.*;
> > >  import java.awt.event.*;
> > >  import java.net.*;
> > >  import java.io.*;
> > > 
> > > 
> > > public class SampleApplet extends Applet
> > implements
> > > ActionListener 
> > > {
> > >   	Connection conn;
> > >   	Statement stmt;
> > > 	String state_code;
> > > 	
> > >          private TextField Tinput;
> > > 	private TextField Toutput;
> > > 	private TextField Terror;
> > >     
> > >          private Button sqlprocess;
> > > 	
> > > 	
> > >         
> > >    public void init(){
> > > 	   
> > > 	   
> > > 	   	try{ Class.forName 
> > ("org.postgresql.Driver");}
> > > 		catch(Exception ex){
> > > 			ex.printStackTrace();}
> > > 		
> > > 		setFont(new Font("TimesRoman",Font.PLAIN,15));
> > > 		setLayout(null);
> > > 		
> > > 		Label Linput = new Label("Enter a state code:
> > ");
> > > 		Tinput = new TextField(10);
> > > 		Label Loutput = new Label("Sql Output");
> > > 		Toutput = new TextField(30);
> > > 		Terror = new TextField(100);
> > > 		sqlprocess = new Button("SqlQuery");
> > > 		
> > > 		Linput.setBounds(10,30,150,30);
> > > 		Tinput.setBounds(170,20,100,30);
> > > 		Loutput.setBounds(10,80,100,30);
> > > 		Toutput.setBounds(110,80,100,30);
> > > 		Terror.setBounds(10,150,200,30);
> > > 		sqlprocess.setBounds(50,210,80,30);
> > > 		
> > > 		add(Linput);
> > > 		add(Tinput);
> > > 		add(Loutput);
> > > 		add(Toutput);
> > > 		add(Terror);
> > > 		add(sqlprocess);
> > > 		
> > > 		sqlprocess.addActionListener(this);
> > > 
> > >    }	      
> > > 	   
> > >    public void start() {
> > > 	   try{ conn =
> > >
> >
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> > > 			stmt = conn.createStatement();				
> > > 	   }
> > > 		catch(Exception ex){
> > > 			
> > > 			ex.printStackTrace();
> > > 			Terror.setText(ex.getMessage());
> > > 		        }			
> > >    }	
> > >    
> > >     public void actionPerformed(ActionEvent ae)
> {
> > >         
> > > 	   if(ae.getActionCommand()=="SqlQuery"){
> > >          
> > > 	     
> > > 		   state_code = Tinput.getText();
> > > 		   
> > > 		   try{ ResultSet res = stmt.executeQuery(
> > "Select
> > > name "+"From statename "+"Where code =
> > > '"+state_code+"'");
> > > 				if(res!=null)
> > > 				while(res.next())
> > > 					{String state_name = res.getString(1);
> > > 					Toutput.setText(state_name);}
> > > 		
> > > 				res.close();
> > > 				stmt.close();
> > > 				conn.close();
> > > 		   }
> > > 		   
> > > 		   catch(Exception ex){
> > > 			   ex.printStackTrace(); }
> > > 			
> > > 		     
> > >        }
> > > 	   
> > > 	}  
> > >     
> > >     
> > > }
> > > 
> > > and I get the error message as
> > > 
> > > "No suitable driver"
> > > 
> > > Please advice me for this problem.
> > > 
> > > Thank you
> > >   
> > > 
> > > 
> > >
> __________________________________________________
> > > Get personalized email addresses from Yahoo!
> Mail
> > - only $35 
> > > a year!  http://personal.mail.yahoo.com/
> > > 
> > 
> > 
> > 
> > 
> > Hello there :
> > 
> > You need to include your .jar archive with your
> > applet
> > 
> > Just copy the jdbc jar to your applet directory 
> > 
> > 
> > <html>
> > <body
> > <applet code=SampleApplet archive=jdbc7.0-1.2.jar 
> > width=800 height=600>
> > </applet>
> > </body>
> > </html>
> > 
> > 
> > 
> > 
> > Saludos 
> > 
> > 
> > Leonel
> > 
> > 
> 
> 
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail -
> only $35 
> a year!  http://personal.mail.yahoo.com/


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* JDBC APPLET Problem
@ 2001-02-05 12:15 v j <jvs_a@yahoo.com>
  0 siblings, 0 replies; 13+ messages in thread

From: v j @ 2001-02-05 12:15 UTC (permalink / raw)
  To: pgsql-interfaces

Dear Sir,
 My Jdbc Applet have already run but only when I copy
the "org" directory into "Desktop" directory of my
computer, for other computer that not have "org"
directory in "Desktop" directory the applet can't run
and shown "no suitable driver" ,why??,  or this means
that archive jdbc7.0-1.2.jar in html file can't be
seen..
advice me please..

Thank you
J. V.

--- v j <jvs_a@yahoo.com> wrote:
> Dear Sir,
>   Thanks you for everybody for advicing me..
>   I've already tried to include both jdbc7.0-1.2.jar
> and postgresql.jar  archive with my applet and then
> copy the jdbc7.0-1.2.jar and postgresql.jar file
> into
> public_html directory(which is the location of
> SampleApplet.class file)  and try to run the applet
> through web browser again and the error message
> still
> shown "No suitable driver".. how should I do more 
> 
> Thanks you
> J. V.
> 
> --- PostgreSQL Server
> <postgres@gonzo.lnxsoftware.com.mx> wrote:
> > On Thu, 1 Feb 2001, v j wrote:
> > 
> > > Dear Sir,
> > >  Now I try to run the Java Program by using JDBC
> > > PostgreSql through Web Browser.
> > > I set the file pg_hba.conf as
> > > 
> > > local  all                                  
> trust
> > > host   all   127.0.0.1   255.255.255.255    
> trust
> > > host   all     0.0.0.0           0.0.0.0    
> trust
> > > 
> > > and the java code as shown below .....
> > > 
> > >  import java.sql.*;
> > >  import java.applet.*;
> > >  import java.awt.*;
> > >  import java.awt.event.*;
> > >  import java.net.*;
> > >  import java.io.*;
> > > 
> > > 
> > > public class SampleApplet extends Applet
> > implements
> > > ActionListener 
> > > {
> > >   	Connection conn;
> > >   	Statement stmt;
> > > 	String state_code;
> > > 	
> > >          private TextField Tinput;
> > > 	private TextField Toutput;
> > > 	private TextField Terror;
> > >     
> > >          private Button sqlprocess;
> > > 	
> > > 	
> > >         
> > >    public void init(){
> > > 	   
> > > 	   
> > > 	   	try{ Class.forName 
> > ("org.postgresql.Driver");}
> > > 		catch(Exception ex){
> > > 			ex.printStackTrace();}
> > > 		
> > > 		setFont(new Font("TimesRoman",Font.PLAIN,15));
> > > 		setLayout(null);
> > > 		
> > > 		Label Linput = new Label("Enter a state code:
> > ");
> > > 		Tinput = new TextField(10);
> > > 		Label Loutput = new Label("Sql Output");
> > > 		Toutput = new TextField(30);
> > > 		Terror = new TextField(100);
> > > 		sqlprocess = new Button("SqlQuery");
> > > 		
> > > 		Linput.setBounds(10,30,150,30);
> > > 		Tinput.setBounds(170,20,100,30);
> > > 		Loutput.setBounds(10,80,100,30);
> > > 		Toutput.setBounds(110,80,100,30);
> > > 		Terror.setBounds(10,150,200,30);
> > > 		sqlprocess.setBounds(50,210,80,30);
> > > 		
> > > 		add(Linput);
> > > 		add(Tinput);
> > > 		add(Loutput);
> > > 		add(Toutput);
> > > 		add(Terror);
> > > 		add(sqlprocess);
> > > 		
> > > 		sqlprocess.addActionListener(this);
> > > 
> > >    }	      
> > > 	   
> > >    public void start() {
> > > 	   try{ conn =
> > >
> >
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> > > 			stmt = conn.createStatement();				
> > > 	   }
> > > 		catch(Exception ex){
> > > 			
> > > 			ex.printStackTrace();
> > > 			Terror.setText(ex.getMessage());
> > > 		        }			
> > >    }	
> > >    
> > >     public void actionPerformed(ActionEvent ae)
> {
> > >         
> > > 	   if(ae.getActionCommand()=="SqlQuery"){
> > >          
> > > 	     
> > > 		   state_code = Tinput.getText();
> > > 		   
> > > 		   try{ ResultSet res = stmt.executeQuery(
> > "Select
> > > name "+"From statename "+"Where code =
> > > '"+state_code+"'");
> > > 				if(res!=null)
> > > 				while(res.next())
> > > 					{String state_name = res.getString(1);
> > > 					Toutput.setText(state_name);}
> > > 		
> > > 				res.close();
> > > 				stmt.close();
> > > 				conn.close();
> > > 		   }
> > > 		   
> > > 		   catch(Exception ex){
> > > 			   ex.printStackTrace(); }
> > > 			
> > > 		     
> > >        }
> > > 	   
> > > 	}  
> > >     
> > >     
> > > }
> > > 
> > > and I get the error message as
> > > 
> > > "No suitable driver"
> > > 
> > > Please advice me for this problem.
> > > 
> > > Thank you
> > >   
> > > 
> > > 
> > >
> __________________________________________________
> > > Get personalized email addresses from Yahoo!
> Mail
> > - only $35 
> > > a year!  http://personal.mail.yahoo.com/
> > > 
> > 
> > 
> > 
> > 
> > Hello there :
> > 
> > You need to include your .jar archive with your
> > applet
> > 
> > Just copy the jdbc jar to your applet directory 
> > 
> > 
> > <html>
> > <body
> > <applet code=SampleApplet archive=jdbc7.0-1.2.jar 
> > width=800 height=600>
> > </applet>
> > </body>
> > </html>
> > 
> > 
> > 
> > 
> > Saludos 
> > 
> > 
> > Leonel
> > 
> > 
> 
> 


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: JDBC APPLET Problem
@ 2001-02-06 04:32 ` v j <jvs_a@yahoo.com>
  1 sibling, 0 replies; 13+ messages in thread

From: v j @ 2001-02-06 04:32 UTC (permalink / raw)
  To: Greg Speegle <Greg@10happythings.com>; +Cc: pgsql-interfaces

Hello..
 This is the detial of my SampleApplet.html file

<HTML>
<BODY>
<P>
<APPLET CODE="SampleApplet.class"  
 ARCHIVE="jdbc7.01.2.jar"
  width=500 height=700>
</APPLET>
</P>
</BODY>
</HTML>

I'm surely that I left these .html, .class,
jdbc7.01.2.jar and directory "org" on the server..
and download from the server to open the web browser..

by specify the location on the server, 
but it only work when copy the "org" directory to my
computer.(I run it on Internet explorer5 and it work
when I copy the "org" directory to my computer but for
Netscape4.5 it shown not known argument)
or may I must add others to .html file?

Thank you
J. V.

--- Greg Speegle <Greg@10happythings.com> wrote:
> 
> VJ,
> 
> Could you post the .html file you are using? And how
> are you
> loading the file into the browser? It sounds like
> the html file is
> on your computer and you are double-clicking it to
> load. This
> would not download the driver from the server, but
> would work
> if you put the hierarchy on the local machine.
> 
> Good luck,
> Greg Speegle
> 
> v j wrote:
> 
> > Dear Sir,
> >  My Jdbc Applet have already run but only when I
> copy
> > the "org" directory into "Desktop" directory of my
> > computer, for other computer that not have "org"
> > directory in "Desktop" directory the applet can't
> run
> > and shown "no suitable driver" ,why??,  or this
> means
> > that archive jdbc7.0-1.2.jar in html file can't be
> > seen..
> > advice me please..
> >
> > Thank you
> > J. V.
> >
> > --- v j <jvs_a@yahoo.com> wrote:
> > > Dear Sir,
> > >   Thanks you for everybody for advicing me..
> > >   I've already tried to include both
> jdbc7.0-1.2.jar
> > > and postgresql.jar  archive with my applet and
> then
> > > copy the jdbc7.0-1.2.jar and postgresql.jar file
> > > into
> > > public_html directory(which is the location of
> > > SampleApplet.class file)  and try to run the
> applet
> > > through web browser again and the error message
> > > still
> > > shown "No suitable driver".. how should I do
> more
> > >
> > > Thanks you
> > > J. V.
> > >
> > > --- PostgreSQL Server
> > > <postgres@gonzo.lnxsoftware.com.mx> wrote:
> > > > On Thu, 1 Feb 2001, v j wrote:
> > > >
> > > > > Dear Sir,
> > > > >  Now I try to run the Java Program by using
> JDBC
> > > > > PostgreSql through Web Browser.
> > > > > I set the file pg_hba.conf as
> > > > >
> > > > > local  all
> > > trust
> > > > > host   all   127.0.0.1   255.255.255.255
> > > trust
> > > > > host   all     0.0.0.0           0.0.0.0
> > > trust
> > > > >
> > > > > and the java code as shown below .....
> > > > >
> > > > >  import java.sql.*;
> > > > >  import java.applet.*;
> > > > >  import java.awt.*;
> > > > >  import java.awt.event.*;
> > > > >  import java.net.*;
> > > > >  import java.io.*;
> > > > >
> > > > >
> > > > > public class SampleApplet extends Applet
> > > > implements
> > > > > ActionListener
> > > > > {
> > > > >           Connection conn;
> > > > >           Statement stmt;
> > > > >   String state_code;
> > > > >
> > > > >          private TextField Tinput;
> > > > >   private TextField Toutput;
> > > > >   private TextField Terror;
> > > > >
> > > > >          private Button sqlprocess;
> > > > >
> > > > >
> > > > >
> > > > >    public void init(){
> > > > >
> > > > >
> > > > >           try{ Class.forName
> > > > ("org.postgresql.Driver");}
> > > > >           catch(Exception ex){
> > > > >                   ex.printStackTrace();}
> > > > >
> > > > >           setFont(new
> Font("TimesRoman",Font.PLAIN,15));
> > > > >           setLayout(null);
> > > > >
> > > > >           Label Linput = new Label("Enter a
> state code:
> > > > ");
> > > > >           Tinput = new TextField(10);
> > > > >           Label Loutput = new Label("Sql
> Output");
> > > > >           Toutput = new TextField(30);
> > > > >           Terror = new TextField(100);
> > > > >           sqlprocess = new
> Button("SqlQuery");
> > > > >
> > > > >           Linput.setBounds(10,30,150,30);
> > > > >           Tinput.setBounds(170,20,100,30);
> > > > >           Loutput.setBounds(10,80,100,30);
> > > > >           Toutput.setBounds(110,80,100,30);
> > > > >           Terror.setBounds(10,150,200,30);
> > > > >          
> sqlprocess.setBounds(50,210,80,30);
> > > > >
> > > > >           add(Linput);
> > > > >           add(Tinput);
> > > > >           add(Loutput);
> > > > >           add(Toutput);
> > > > >           add(Terror);
> > > > >           add(sqlprocess);
> > > > >
> > > > >          
> sqlprocess.addActionListener(this);
> > > > >
> > > > >    }
> > > > >
> > > > >    public void start() {
> > > > >      try{ conn =
> > > > >
> > > >
> > >
> >
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> > > > >                   stmt =
> conn.createStatement();
> > > > >      }
> > > > >           catch(Exception ex){
> > > > >
> > > > >                   ex.printStackTrace();
> > > > >                  
> Terror.setText(ex.getMessage());
> > > > >                   }
> > > > >    }
> > > > >
> > > > >     public void actionPerformed(ActionEvent
> ae)
> > > {
> > > > >
> > > > >      if(ae.getActionCommand()=="SqlQuery"){
> > > > >
> > > > >
> > > > >              state_code = Tinput.getText();
> > > > >
> > > > >              try{ ResultSet res =
> stmt.executeQuery(
> > > > "Select
> > > > > name "+"From statename "+"Where code =
> > > > > '"+state_code+"'");
> > > > >                           if(res!=null)
> > > > >                           while(res.next())
> > > > >                                   {String
> state_name = res.getString(1);
> > > > >                                  
> Toutput.setText(state_name);}
> > > > >
> > > > >                           res.close();
> > > > >                           stmt.close();
> > > > >                           conn.close();
> > > > >              }
> > > > >
> > > > >              catch(Exception ex){
> > > > >                      ex.printStackTrace(); }
> > > > >
> > > > >
> > > > >        }
> > > > >
> > > > >   }
> > > > >
> > > > >
> > > > > }
> > > > >
> > > > > and I get the error message as
> > > > >
> > > > > "No suitable driver"
> > > > >
> > > > > Please advice me for this problem.
> > > > >
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: JDBC APPLET Problem
@ 2001-02-06 04:33 ` v j <jvs_a@yahoo.com>
  1 sibling, 0 replies; 13+ messages in thread

From: v j @ 2001-02-06 04:33 UTC (permalink / raw)
  To: Greg Speegle <Greg@10happythings.com>; +Cc: pgsql-interfaces

Hello..
 This is the detial of my SampleApplet.html file

<HTML>
<BODY>
<P>
<APPLET CODE="SampleApplet.class"  
 ARCHIVE="jdbc7.01.2.jar"
  width=500 height=700>
</APPLET>
</P>
</BODY>
</HTML>

I'm surely that I left these .html, .class,
jdbc7.01.2.jar and directory "org" on the server..
and download from the server to open the web browser..

by specify the location on the server, 
but it only work when copy the "org" directory to my
computer.(I run it on Internet explorer5 and it work
when I copy the "org" directory to my computer but for
Netscape4.5 it shown not known argument)
or may I must add others to .html file?

Thank you
J. V.

--- Greg Speegle <Greg@10happythings.com> wrote:
> 
> VJ,
> 
> Could you post the .html file you are using? And how
> are you
> loading the file into the browser? It sounds like
> the html file is
> on your computer and you are double-clicking it to
> load. This
> would not download the driver from the server, but
> would work
> if you put the hierarchy on the local machine.
> 
> Good luck,
> Greg Speegle
> 
> v j wrote:
> 
> > Dear Sir,
> >  My Jdbc Applet have already run but only when I
> copy
> > the "org" directory into "Desktop" directory of my
> > computer, for other computer that not have "org"
> > directory in "Desktop" directory the applet can't
> run
> > and shown "no suitable driver" ,why??,  or this
> means
> > that archive jdbc7.0-1.2.jar in html file can't be
> > seen..
> > advice me please..
> >
> > Thank you
> > J. V.
> >
> > --- v j <jvs_a@yahoo.com> wrote:
> > > Dear Sir,
> > >   Thanks you for everybody for advicing me..
> > >   I've already tried to include both
> jdbc7.0-1.2.jar
> > > and postgresql.jar  archive with my applet and
> then
> > > copy the jdbc7.0-1.2.jar and postgresql.jar file
> > > into
> > > public_html directory(which is the location of
> > > SampleApplet.class file)  and try to run the
> applet
> > > through web browser again and the error message
> > > still
> > > shown "No suitable driver".. how should I do
> more
> > >
> > > Thanks you
> > > J. V.
> > >
> > > --- PostgreSQL Server
> > > <postgres@gonzo.lnxsoftware.com.mx> wrote:
> > > > On Thu, 1 Feb 2001, v j wrote:
> > > >
> > > > > Dear Sir,
> > > > >  Now I try to run the Java Program by using
> JDBC
> > > > > PostgreSql through Web Browser.
> > > > > I set the file pg_hba.conf as
> > > > >
> > > > > local  all
> > > trust
> > > > > host   all   127.0.0.1   255.255.255.255
> > > trust
> > > > > host   all     0.0.0.0           0.0.0.0
> > > trust
> > > > >
> > > > > and the java code as shown below .....
> > > > >
> > > > >  import java.sql.*;
> > > > >  import java.applet.*;
> > > > >  import java.awt.*;
> > > > >  import java.awt.event.*;
> > > > >  import java.net.*;
> > > > >  import java.io.*;
> > > > >
> > > > >
> > > > > public class SampleApplet extends Applet
> > > > implements
> > > > > ActionListener
> > > > > {
> > > > >           Connection conn;
> > > > >           Statement stmt;
> > > > >   String state_code;
> > > > >
> > > > >          private TextField Tinput;
> > > > >   private TextField Toutput;
> > > > >   private TextField Terror;
> > > > >
> > > > >          private Button sqlprocess;
> > > > >
> > > > >
> > > > >
> > > > >    public void init(){
> > > > >
> > > > >
> > > > >           try{ Class.forName
> > > > ("org.postgresql.Driver");}
> > > > >           catch(Exception ex){
> > > > >                   ex.printStackTrace();}
> > > > >
> > > > >           setFont(new
> Font("TimesRoman",Font.PLAIN,15));
> > > > >           setLayout(null);
> > > > >
> > > > >           Label Linput = new Label("Enter a
> state code:
> > > > ");
> > > > >           Tinput = new TextField(10);
> > > > >           Label Loutput = new Label("Sql
> Output");
> > > > >           Toutput = new TextField(30);
> > > > >           Terror = new TextField(100);
> > > > >           sqlprocess = new
> Button("SqlQuery");
> > > > >
> > > > >           Linput.setBounds(10,30,150,30);
> > > > >           Tinput.setBounds(170,20,100,30);
> > > > >           Loutput.setBounds(10,80,100,30);
> > > > >           Toutput.setBounds(110,80,100,30);
> > > > >           Terror.setBounds(10,150,200,30);
> > > > >          
> sqlprocess.setBounds(50,210,80,30);
> > > > >
> > > > >           add(Linput);
> > > > >           add(Tinput);
> > > > >           add(Loutput);
> > > > >           add(Toutput);
> > > > >           add(Terror);
> > > > >           add(sqlprocess);
> > > > >
> > > > >          
> sqlprocess.addActionListener(this);
> > > > >
> > > > >    }
> > > > >
> > > > >    public void start() {
> > > > >      try{ conn =
> > > > >
> > > >
> > >
> >
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> > > > >                   stmt =
> conn.createStatement();
> > > > >      }
> > > > >           catch(Exception ex){
> > > > >
> > > > >                   ex.printStackTrace();
> > > > >                  
> Terror.setText(ex.getMessage());
> > > > >                   }
> > > > >    }
> > > > >
> > > > >     public void actionPerformed(ActionEvent
> ae)
> > > {
> > > > >
> > > > >      if(ae.getActionCommand()=="SqlQuery"){
> > > > >
> > > > >
> > > > >              state_code = Tinput.getText();
> > > > >
> > > > >              try{ ResultSet res =
> stmt.executeQuery(
> > > > "Select
> > > > > name "+"From statename "+"Where code =
> > > > > '"+state_code+"'");
> > > > >                           if(res!=null)
> > > > >                           while(res.next())
> > > > >                                   {String
> state_name = res.getString(1);
> > > > >                                  
> Toutput.setText(state_name);}
> > > > >
> > > > >                           res.close();
> > > > >                           stmt.close();
> > > > >                           conn.close();
> > > > >              }
> > > > >
> > > > >              catch(Exception ex){
> > > > >                      ex.printStackTrace(); }
> > > > >
> > > > >
> > > > >        }
> > > > >
> > > > >   }
> > > > >
> > > > >
> > > > > }
> > > > >
> > > > > and I get the error message as
> > > > >
> > > > > "No suitable driver"
> > > > >
> > > > > Please advice me for this problem.
> > > > >
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* JDBC APPLET Problem
@ 2001-02-06 04:37 v j <jvs_a@yahoo.com>
  0 siblings, 0 replies; 13+ messages in thread

From: v j @ 2001-02-06 04:37 UTC (permalink / raw)
  To: Greg@10happythings.com; +Cc: pgsql-interfaces

Hello..
 This is the detial of my SampleApplet.html file

<HTML>
<BODY>
<P>
<APPLET CODE="SampleApplet.class"  
 ARCHIVE="jdbc7.01.2.jar"
  width=500 height=700>
</APPLET>
</P>
</BODY>
</HTML>

I'm surely that I left these .html, .class,
jdbc7.01.2.jar and directory "org" on the server..
and download from the server to open the web browser..

by specify the location on the server, 
but it only work when copy the "org" directory to my
computer.(I run it on Internet explorer5 and it work
when I copy the "org" directory to my computer but for
Netscape4.5 it shown not known argument)
or may I must add others to .html file?

Thank you
J. V.

--- Greg Speegle <Greg@10happythings.com> wrote:
> 
> VJ,
> 
> Could you post the .html file you are using? And how
> are you
> loading the file into the browser? It sounds like
> the html file is
> on your computer and you are double-clicking it to
> load. This
> would not download the driver from the server, but
> would work
> if you put the hierarchy on the local machine.
> 
> Good luck,
> Greg Speegle
> 
> v j wrote:
> 
> > Dear Sir,
> >  My Jdbc Applet have already run but only when I
> copy
> > the "org" directory into "Desktop" directory of my
> > computer, for other computer that not have "org"
> > directory in "Desktop" directory the applet can't
> run
> > and shown "no suitable driver" ,why??,  or this
> means
> > that archive jdbc7.0-1.2.jar in html file can't be
> > seen..
> > advice me please..
> >
> > Thank you
> > J. V.
> >
> > --- v j <jvs_a@yahoo.com> wrote:
> > > Dear Sir,
> > >   Thanks you for everybody for advicing me..
> > >   I've already tried to include both
> jdbc7.0-1.2.jar
> > > and postgresql.jar  archive with my applet and
> then
> > > copy the jdbc7.0-1.2.jar and postgresql.jar file
> > > into
> > > public_html directory(which is the location of
> > > SampleApplet.class file)  and try to run the
> applet
> > > through web browser again and the error message
> > > still
> > > shown "No suitable driver".. how should I do
> more
> > >
> > > Thanks you
> > > J. V.
> > >
> > > --- PostgreSQL Server
> > > <postgres@gonzo.lnxsoftware.com.mx> wrote:
> > > > On Thu, 1 Feb 2001, v j wrote:
> > > >
> > > > > Dear Sir,
> > > > >  Now I try to run the Java Program by using
> JDBC
> > > > > PostgreSql through Web Browser.
> > > > > I set the file pg_hba.conf as
> > > > >
> > > > > local  all
> > > trust
> > > > > host   all   127.0.0.1   255.255.255.255
> > > trust
> > > > > host   all     0.0.0.0           0.0.0.0
> > > trust
> > > > >
> > > > > and the java code as shown below .....
> > > > >
> > > > >  import java.sql.*;
> > > > >  import java.applet.*;
> > > > >  import java.awt.*;
> > > > >  import java.awt.event.*;
> > > > >  import java.net.*;
> > > > >  import java.io.*;
> > > > >
> > > > >
> > > > > public class SampleApplet extends Applet
> > > > implements
> > > > > ActionListener
> > > > > {
> > > > >           Connection conn;
> > > > >           Statement stmt;
> > > > >   String state_code;
> > > > >
> > > > >          private TextField Tinput;
> > > > >   private TextField Toutput;
> > > > >   private TextField Terror;
> > > > >
> > > > >          private Button sqlprocess;
> > > > >
> > > > >
> > > > >
> > > > >    public void init(){
> > > > >
> > > > >
> > > > >           try{ Class.forName
> > > > ("org.postgresql.Driver");}
> > > > >           catch(Exception ex){
> > > > >                   ex.printStackTrace();}
> > > > >
> > > > >           setFont(new
> Font("TimesRoman",Font.PLAIN,15));
> > > > >           setLayout(null);
> > > > >
> > > > >           Label Linput = new Label("Enter a
> state code:
> > > > ");
> > > > >           Tinput = new TextField(10);
> > > > >           Label Loutput = new Label("Sql
> Output");
> > > > >           Toutput = new TextField(30);
> > > > >           Terror = new TextField(100);
> > > > >           sqlprocess = new
> Button("SqlQuery");
> > > > >
> > > > >           Linput.setBounds(10,30,150,30);
> > > > >           Tinput.setBounds(170,20,100,30);
> > > > >           Loutput.setBounds(10,80,100,30);
> > > > >           Toutput.setBounds(110,80,100,30);
> > > > >           Terror.setBounds(10,150,200,30);
> > > > >          
> sqlprocess.setBounds(50,210,80,30);
> > > > >
> > > > >           add(Linput);
> > > > >           add(Tinput);
> > > > >           add(Loutput);
> > > > >           add(Toutput);
> > > > >           add(Terror);
> > > > >           add(sqlprocess);
> > > > >
> > > > >          
> sqlprocess.addActionListener(this);
> > > > >
> > > > >    }
> > > > >
> > > > >    public void start() {
> > > > >      try{ conn =
> > > > >
> > > >
> > >
> >
>
DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
> > > > >                   stmt =
> conn.createStatement();
> > > > >      }
> > > > >           catch(Exception ex){
> > > > >
> > > > >                   ex.printStackTrace();
> > > > >                  
> Terror.setText(ex.getMessage());
> > > > >                   }
> > > > >    }
> > > > >
> > > > >     public void actionPerformed(ActionEvent
> ae)
> > > {
> > > > >
> > > > >      if(ae.getActionCommand()=="SqlQuery"){
> > > > >
> > > > >
> > > > >              state_code = Tinput.getText();
> > > > >
> > > > >              try{ ResultSet res =
> stmt.executeQuery(
> > > > "Select
> > > > > name "+"From statename "+"Where code =
> > > > > '"+state_code+"'");
> > > > >                           if(res!=null)
> > > > >                           while(res.next())
> > > > >                                   {String
> state_name = res.getString(1);
> > > > >                                  
> Toutput.setText(state_name);}
> > > > >
> > > > >                           res.close();
> > > > >                           stmt.close();
> > > > >                           conn.close();
> > > > >              }
> > > > >
> > > > >              catch(Exception ex){
> > > > >                      ex.printStackTrace(); }
> > > > >
> > > > >
> > > > >        }
> > > > >
> > > > >   }
> > > > >
> > > > >
> > > > > }
> > > > >
> > > > > and I get the error message as
> > > > >
> > > > > "No suitable driver"
> > > > >
> > > > > Please advice me for this problem.
> > > > >
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/



^ permalink  raw  reply  [nested|flat] 13+ messages in thread


end of thread, other threads:[~2001-02-06 04:37 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-01 13:16 JDBC APPLET Problem v j <jvs_a@yahoo.com>
2001-02-01 23:32 ` Bruno Dickhoff <bruno@dickhoff.de>
2001-02-02 05:11 ` PostgreSQL Server <postgres@gonzo.lnxsoftware.com.mx>
2001-02-02 06:22   ` v j <jvs_a@yahoo.com>
2001-02-02 05:21 ` S.A.Pamungkas <moenk_2000@yahoo.com>
2001-02-02 08:38 ` Peter T Mount <peter@retep.org.uk>
2001-02-05 09:44   ` v j <jvs_a@yahoo.com>
2001-02-02 06:42 JDBC APPLET Problem v j <jvs_a@yahoo.com>
2001-02-05 12:11 ` v j <jvs_a@yahoo.com>
2001-02-05 12:15 JDBC APPLET Problem v j <jvs_a@yahoo.com>
2001-02-06 04:32 ` v j <jvs_a@yahoo.com>
2001-02-06 04:33 ` v j <jvs_a@yahoo.com>
2001-02-06 04:37 JDBC APPLET Problem v j <jvs_a@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox