Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 25th, 2006, 02:23 AM
Friend of Wrox
 
Join Date: Jan 2006
Location: Hardwar, Uttranchal, India.
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default Calling Applet !!!

Hi All!!

     I am very Beginner in ASP. I called this applet in ASP file it is being run but it is just printing the Button and combobox but data is not fetching from the oracle while it I run it in DOS by:
appletviewer CheckApplet.java
then it is working perfectly. so why not in browser through ASP.

HELP ME PLS.


My ASP Code is :

------------------------
<html>
    <Applet code = "CheckApplet.class" height = "300" width = "300">
    </Applet>
</html>
------------------------

And my Java Code is:
-----------------------------------
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class CheckApplet extends Applet
{
Connection con;
Statement st;
    public void init()
    {
        Button B1 = new Button("Click on Me");
        TextField T1 = new TextField();

        try
        {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("Jdbc:Odbc:OracleScott ", "scott", "tiger");
            st = con.createStatement();
            ResultSet rs = st.executeQuery("select * from emp");
            rs.next();
            //System.out.println("Name : " + rs.getString("ENAME"));
            T1.setText(rs.getString("ENAME"));
        }
        catch(Exception Ex)
        {
            System.out.println("Exception Generated : " + Ex);
        }



        add(B1);
        add(T1);
    }
}
-----------------------------------
    Thanks in Advance!!!:)

DPK..
__________________
DPK..




Similar Threads
Thread Thread Starter Forum Replies Last Post
need help in applet splashsvp Java Basics 1 March 4th, 2007 08:47 AM
frame within a Applet vinay.bk Java GUI 1 January 10th, 2006 05:14 PM
applet parameters k_o_bliss J2EE 0 August 21st, 2005 04:28 PM
an applet for newbies freezotic BOOK: Beginning Java 2 2 June 7th, 2004 09:22 PM
Signed Applet example? EhobaX Java GUI 1 January 6th, 2004 06:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.