applet « Development « Java Database Q&A

1. Applets and JDBC

Hi Im new to Applets and I am trying to set up a login applet that connects to my mySQL database.... It shows in Netbeans but not when I load it.... ...

2. Problem Using JApplet that Accesses a Database on a Web Application Using Netbeans 6.5.1

I created a JApplet using Netbeans 6.5.1 that accesses a database. When the program is run by itself, it runs perfectly. The issue is when you try to put ...

3. apple-jdbc-web server

I'm a BSc student in CIT. I have a project in which I want to use a Java applet and JDBC in a sort of host/client. My applet is working properly on ...

4. Execute jdbc applet in browser

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

<applet code="A0" width=250 height=200>

public class A0 extends Applet implements ActionListener,ItemListener
String msg="";

Button view,delete,create,edit,reapp,exit;
TextField M_head;
int x,i,ans=0,flag;

public void init()
setLayout(new FlowLayout(FlowLayout.CENTER,50,3));

view = new Button("view");
delete = new Button("delete");
create = new Button("create");
edit ...

5. How to securely communicate with a database using a java applet

I have been writing web applications for quite sometime in PHP with MySQL. I always stored my database connection information into a configuration variable and connected to the database that way. A ...

6. problem with applet database access

the applet(which make connection to access database) i developed is working fine in applet viewer, but when embedded in an html file, it cannot access the database. how can i rectify ...

7. Using an applet embedded in html page to communicate with database

I have created an applet that communicates with a MS Access database (or at least, it should). It works fine when I run it through Dr Java or NetBeans, but when ...

8. How to link Java applets and JDBC?

I want to create a html file with a Java applet for my database. The Java code works fine in the applet viewer and I've used a JDBC jar file for ...

9. Using JDBC with an applet

11. jdbc and applet

hai We are developing a software in Java to conduct an online test.We have used three files ,the first is the "question_bank" containing 1500 questions having 500 questions each in C,Computer fundamentals and analytical reasoning .The second file is "question_paper"that is created at runtime by selecting 90 questions(30 each)from the first file ,the third file keeps records of all candidates who ...

12. JDBC / Applets.

13. Applets

14. using JDBC with applets

15. Signed Applet: NoClassDefFoundError

16. JDBC in Applets, problems

17. jdbc applet works from command line but not on web page...

Hi, Im pretty new at java, and im trying to create an applet that connects to a database on a remote machine. So far, I have been able to connect to the database if i invoke the appletviewer from the command line like this: C:\java>appletviewer protocols.html where protocols.html looks like this: Protocol Database


19. Applet -Database Connectivity


21. DIsplaying Urdu Fonts in Applet

23. applet and JDBC

24. Applet reading from Excel sheet

When I am running the following as a normal java class it runs and fetches result from an excel file kept in the same directort but gives permission error. I wish to plcae the applet and excel file at and use the excel sheet as database. Can Anyone help me with this? import java.applet.Applet; import*; import*; import java.sql.*; ...

25. Writing values to Excel from Applet

import java.sql.*; public class excelWrite { public static void main(String args[]) { Connection conn=null; Statement stmt=null; String sql=""; ResultSet rs=null; String srno="10"; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); System.out.println(" "+Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")); conn=DriverManager.getConnection("jdbc dbc:Excel Files","",""); stmt=conn.createStatement(); sql = "CREATE TABLE [Sheet1$] (srno TEXT,test TEXT,description TEXT,output TEXT,output1 TEXT,pass TEXT)"; boolean b=stmt.execute(sql); sql="INSERT INTO [Sheet1$](srno,test,description,output,output1,pass) VALUES ('1','Hari','Venke','Vasan','Swami','Shalin')"; int i =stmt.executeUpdate(sql); } catch (Exception e){ System.err.println(e); } finally { ...

26. Problem running an applet using appletviewer that uses JDBC

Hello, I'm new and am having problems running an applet, using appletviewer, that uses a class that uses the AS400JDBCDriver class to access data on a AS/400 machine and display the output in a JTable. If I run this java program as a JFrame instead of a JApplet it runs just fine. Is there some sort of applet security issue preventing ...

27. Jdbc through applets

28. jdbc with applets

29. Applet and DataBase Connectivity

31. java database applet with Internet Explorer

Hi I have a problem with my java applet, I connect my java applet with the database & accessing & comparing the database using some condition statement applet is working fine with appletviewer, I write an policy file in the same directory, I use the following command: appletviewer login.html but when I am running my Applet in Explorer it is ...

32. linking JDBC with Applet

this program is not compiling........ plzz help... import java.sql.*; import*; import java.awt.*; import java.applet; import java.awt.Button; public class Test extends Applet implements ActionListener { TextField tf; TextArea ta; Button b; public static void main(String ar[]) { Object ob = new Object(); init(); } void init() { tf= new TextField(10,5); tf2 = new TextArea(10,5); b= new Button("click"); tf2.add(); tf.add(); b.addActionListener(this); } ...

33. Applet With JDBC

34. applets with jdbc

35. JDBC Applet problem

I am trying to run a sample JDBC Applet code I picked from Sun's Java web site. I have a Derby DB sitting on my local PC and thought I would be able to leverage the sample to connect to this local DB and issue a select SQL statement and display the results. But it throws me an error stating: SQLException: ...

36. applet screen

Hi, I am doing a program like this in applet with mysql: if anyone dial a number 121277737 from an extension for ex:5110,the id,status,inbound ,outbound for both these numbers are getting stored in database at the same the following: Extension Id status inbound outbound 5110 34574.11 up sip/9812 sip/9823 12127773 34574.12 Ring sip/9811 sip/9825 Now i have to retrieve all ...

37. show database on applet

//imports import java.awt.*; import java.awt.event.*; import java.applet.*; import*; import*; import java.sql.*; public class AddRuntime extends java.applet.Applet implements ActionListener { //con database var Statement st; Connection con; //awt components Panel btnpanel; Panel panel; Panel upperPane; Panel middlePane; Panel lowerPane; TextField OldMedID; TextField MedID; TextField MedTit; TextField Qt; TextField Pric; TextField tfEnterString; List addString; Label lblOldMedID; Label lblMedID; Label lblMedTit; Label ...

38. submitting the applet input details to database

I think applet is enough for me.coz this project is for working in intranet card is just an example database.Now i need to update the records which is not filled in input form by filling it.I am getting syntax error.please correct my syntax st.executeUpdate("UPDATE `credit_cards` SET (`cardid` , `name`)VALUES('"+ Cardid +"')"); when i used the below syntax the details are ...

39. Somebody correct my code Iam trying to create an applet which connects DB

JPanel panel; //Member Function/ public void init() { panel = new JPanel(); lblStdId = new JLabel("Aircraft Booking"); lblStdSeats = new JLabel("No of Available Seats"); lblStdAircraft = new JLabel("Choose your Aircraft"); //txtStdId = new JTextField(5);/ String p = "Select * from Aircraft where aircrafttypeid"; /*Initialize and load the JDBC-ODBC Bridge driver*/ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); /*Establish a connection with a data source*/ Connection con = ...

40. Applet to Database

I trying to connect to the database once when the mouse enters the applet..(i'll launch it in Internet Explore).I have signed jar,so that it 'll read the local files also.. But while compiling getting the following error c:\documents and settings\javac -classpath ".;./lib/mssqlserver.jar;./lib/msbase.jar;./lib/msutil.jar" xmltrail/ this is the command i'm giving and trying to exec. Its getting complied with no error.. but in ...

41. Java Secrity Issue - Applet / MS-Access / IE6.0

Hi I am getting the foll exception when my applet tries to load driver for MS-Access database. I believe i have to create a security file. Can anyone pls tell me how to create a security file and how to make sure that IE6.0 picks the security file. access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc) Thanks

42. jdbc applet to access iSeries

I guess I don't have to use applets, but the program will be located on the AS/400 server. Clients' machines on the network will access it and run it in their internet browsers. I figured that since it will be on browsers, it should be an applet. Also, if will be run on the same machine that the datafiles are on. ...

43. Writing into database on the server using an applet

I have the same problem, but in my case I can't test an applet in the local way, because the application needs to connect to a VPN that provide company information that fills some dinamical components of the entire page and the applet, like

44. jdbc in applet

Hi, I have an applet which is connecting to a database , getting some info in order to show it but when I run it from Eclipse->Run->Run As->Java Applet everything is fine. When I put it in .html tag and try to view it through appletviewer I got ClassNotFoundException. Is it something with the classpath because I have put the ...

45. Java Applets and Databases

46. Connectivity of database through applet

Possible answers to a more focused question: Make sure the jar file containing the JDBC driver is in your applet's classpath. Read the JDBC tutorial. Make sure that the network connectivity between your client and the database is working. Any of those sound right? No? Want to ask a more specific question?

47. Issues with applet displays relating to JDBC connectivity

...I think the penny dropped. I'll get back to you. I tried to fix the bracketing but tab doesn't work with the code brackets, so I spaced instead and tried to make it even. It's not my intent to waste your time, I truly do appreciate every second that you have devoted to my problem - if it weren't for these ...

48. Applet database

49. how to read data from database to applet

} catch( Exception e ) { System.out.println( e ) ; } } } java Read_Capital_country_from_database OUT PUT OF ABOVE PROGRAM IS : INDIA NEW DELHI PAKISTAN ISLAMABAD AFGHANISTAN KABUL ........................ ...................; BUT SAME PROGRAM WHEN I GO TO WRITE IN APPLET THIS TIME APPLET DOES OPEN BUT ERROR SHOWS ON STANDARD OUT PUT java.lang.ClassNotFoundException: com.mysql.jdbc.Driver THIS IS THE PROGRAM WRITTEN FOR ...

50. Applet connectivity to database

String sql="INSERT INTO student_table (First_Name,Last_Name,Age,***,Email,Phone_No,Address,SSC_Marks,HSSC_Marks,Graduation_Marks,PG_Marks,ts)"+"VALUES(" + "'" + textStudentFN.getText() + "', " + "'" + textStudentLN.getText() + "', " + "'" + textStudentAge.getText() + "', " + "'" + comboStudentPG.getSelectedIndex() + "', " + "'" + textStudentEmail.getText() + "', " + "'" + textStudentPhoneNo.getText() + "', " + "'" + textStudentAddress.getText() + "', " + "'" + textStudentSSC.getText() + "', " ...

51. Creating a Website in an Applet w/ Database Support

i refuse to poison my brain by learning html and yet i have this web space that is going entirely unused. ive been thinking about what i can do to have some fun with it. (note: i am completely internet illiterate) is it possible to make an applet take up the whole browser tab and create a "website" that runs entirely ...

52. How to store image in database using an Applet

Open a connection from the URL object, then cast the connection to type HttpURLConnection. Set the method to "POST" or "PUT", then call getOutputStream() on the connection and write the image data. It's a good idea to add a Content-length header with the size of the data to be sent before sending it. I don't know how you receive this data ...

53. Java Secrity Issue - Applet / MS-Access / IE6.0

Hi I am getting the foll exception when my applet tries to load driver for MS-Access database. I believe i have to create a security file. Can anyone pls tell me how to create a security file and how to make sure that IE6.0 picks the security file. access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc) Thanks


HELLO TO ALL MY APPLET IS USING ODBC AND CONNECTING TO ACCES. I HAVE CREATED POLICY FILE SO THAT I CAN DISPLAY APPLET IN APPLETVIEWER. APPLET RUNS FINE IS APPLETVIEWER WITH FOLLOWING COMMANDLINE Appletviewer = pol label.htm. however when i try to display applet in web browser, it display following error message "load-Can't instantiate class" any help will be welcome ...

55. Problem in Accessing DataBase using an applet

n=0; for ( var w=0; w<=document.forms[0].WeaponType.length-1; w++) { var lstObj = document.forms[0].WeaponType; if(lstObj) { if(lstObj.options[w].selected == true) { Wpn_Code[n] = lstObj.options[w].value; n++; } } } for( var j=0; j<= Wpn_Code.length-1; j++) { alert("value " + Wpn_Code[j] ); } var str = "SELECT Govt_Fee, Service_Fee FROM tblCharges WHERE (Subject_Code =" + Sub_Code + " AND ";

56. use of jdbc in applets

If you are learning Java then applets are perhaps not the best way to learn. You could debate about that. But applets plus JDBC plus Microsoft Access are definitely not the way to go. In your case I would suggest stop using applets, because there are too many issues to deal with that have nothing to do with learning Java. Write ...

57. Applet with JDBC runs very slow

I have recently created an applet which I am using to interface with a MS SQL Server 2000 database using JDBC. The server is running W2K Server, and a Tomcat web server. There are some performance problems with this application. The volume of data being demanded by the database is very low, yet it runs very slow. More specifically, however, the ...