32,199 Topics
| |
try{ String b = jTextField1.getText(); String sql = "SELECT * FROM DataImput ORDER BY InvoiceNumber=?"; pst=conn.prepareStatement(sql); pst.setString(1, b); rs=pst.executeQuery(); jTable1.setModel(DbUtils.resultSetToTableModel(rs)); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ } } } this is the code I work to search. it actually work. but really weird. … | |
I set up a servlet project in eclipse and I am trying to connect a Access databasae(Ucanaccess) with it. By looking at below error, its look like I am missing jar files but if you take a look at attchement image. You will see all my jar files are in … | |
Hi Friends. I am facing Microsoft ODBC Driver error at run time in my program. I am using window 7, jdk 7 and Ms Access 2007. I am using "jdbc:odbc:JdbcOdbcDriver". I am giving code and error message below. Please tell me solution of this problem import java.sql.*; public class JdbcDMLEx2 … | |
HI to all! I am facing some exceptions in my database connectivity programs. I am using jdk7, window7 and Ms Access 2007. I am giving code of programs and exeption. import java.sql.*; public class ResultSetEx { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:personDSN"; Connection … | |
I am trying to access a site that displays a camera monitoring my granddaughter's daycare. I have installed the latest version of Java on my Mac running Lion. I have added an exception for the website to the security settings for Java but it continues to block my access to … | |
Assume that a bank maintains two kinds of accounts for customers,one called as Savings account and the other as Current Account.The Savings account provide compound interest and withdrawal facilities but no cheque book facility.The Current Account provides cheque book facilty but no interest. Current Account holders should also maintain a … | |
Im having ap roblem with this. ![1.JPG](/attachments/small/4/cde330e9ebb2a478c54b56e4280cf4a3.JPG "align-left") after I press Save button that image show up it doesnt execute this code String te1 = tf1.getText(); String te2 = TA3.getText(); String te3 = TA2.getText(); String te4 = TA1.getText(); String te5 = tf2.getText(); String te6 = TL1.getText(); String sql = "UPDATE … | |
I am trying to connect access database with eclipse but it is not working. I first created data source in "ODBC Data Source Administrator(32-bits)" for windows than I add the jar file But I am getting an error: ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver SQLException: No suitable driver found for jdbc:odbc:J2EE_Database public class ex01 … | |
**Create a java program that will accept 3quizzes grades then display the average. Pahelp nmn po dito. about sia sa import java.util.scanner at system.in at scanner kailangan daw isearch muna yan pra mlaman kung panu gawin ung program. pahelp po salamat po :D** | |
can someone please tell me how to fix this thing? Im loosing my mind here. in a form this code work well. in other it doesn't I create an other form, import everything again and it is not working! try{ int row = Data_Table1.getSelectedRow(); String Table_click1 =(Data_Table1.getModel().getValueAt(row, 0).toString()); String sql … | |
I am developing a server which detects a device and its connection speed . is there any way i can detect a client's connection speed through response headers ?? public class Server_X { static int count = 0; public static void main(String args[]) { Socket s = null; ServerSocket ss2 … | |
Hi. Im trying to write specific text in a .txt file that file would be imported inside a folder I use this to create a file or folder File folder = new File("d:"+IN.getText()); if (folder.mkdir()){ System.out.println("Batch is created!"); }else{ System.out.println("This batch already exists."); } can create a .txt with a … | |
I am using Eclipse, java8 I am trying to connect access database with eclipse but it is not working. I first created data source in "ODBC Data Source Administrator(32-bits)" for windows and than I added the jar file (mysql-connector-java-5.1.35-bin) But I am getting an error: ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver at … | |
Help pls. I need to make a program. A program that calculates an employee’s pay per week. Obtain from the user an hourly pay rate and the number of hours worked for the week. Calculate their pay for the week (no overtime, and no taxes). | |
I'm curious, when setting the default close operation for JFrames, should you use JFrame's constants or WindowConstants' constants? As far as I can tell they're the same. Although, IntelliJ (not tested on other IDE's) prefers WindowConstants' EXIT_ON_CLOSE at least. So basically my question is, which one should be used? Which … | |
Hello, i am planning on designing an airline mobile application with android, as my testing devce. i'm doing this for the first time, can someone please guide me on how to do this? All help wiil be appreciated | |
hello..... i am new in the coding field..... and i understand the working of codes in java......but couldn't able to start.....i have to make a program of videoconferencing.....how to start coding on it..... | |
Write a java program that accept two numbers from the user and print out the following sample out first number: 7 second number: 2 the second number goes in to the first number 3 time with a remainder of 1. | |
Is this try catch block enough to ensure the process ran successfully? protected boolean attemptLaunch() { try { System.out.println("Attempting to open '" + name + "'."); //Try to open the Process new ProcessBuilder(path).start(); return true; } catch (IOException e) { System.out.println("Opening failed. Will retry during next Iteration."); return false; } … | |
Am coding a college council voting system for my school in netbeans and mysql saver. i have populated jtables containing cadidates (jtable1 for president, jtable2 for vice president etc) and i have put a jbutton so that after sellecting candidents of choice one from each jtable, you click the jbutton … | |
I am using eclipse 4.4 luna, where i created the web application project as my project is to be deployed on app engine. So when i try to run the project, there is no 'run on server' option to run the project on Tomcat. Please help me, am stuck on … | |
I'm trying to give access to client computer from my server and also tryin to revoke the granted access... the grant is successful but the revoking is not working please help. hms is the satabase that i want to give access to my clients.. my code try { Connection con … | |
Im using NetBeans to create a data entry software for a friend. when I save a data, it create a folder in specified location, and the name of that folder will be different from each other for example. ![1.JPG](/attachments/large/4/e1b8ccbadaaab2f4ef21954288e53b40.JPG "align-center") it pick the Date,Invoice Number, Subject name, and create the … | |
Please help me with how i may receive an sms to my java application using ozeki. I have used sample code that i got from http://www.ozekisms.com/index.php?owpn=584 , I used that sample code and was able to send sms. Using the same code how may i receive an sms so that … | |
Im having trouble making the enemy walking intelligence, what road to take to reach the target. So even though i have try this for 3 days, i have no clue what to do now. Say a enemy have a target. and the enemy should aproach it. but i want the … | |
So this is the first time using a Spring Layout and I gotta say, it honestly seems like a very nice Layout to use, but I can't quite seem to get it working the way I want it to. Let me explain: I have a JList which should be inset … | |
I need a boolean to be stored with a String (or possibly a Path, not sure which one I want to use yet). I thought about using a Map, so I did some looking around and found out that LinkedHashMaps are the only type of Map that stay in Order … | |
Hi Dw. I have a question of how can one detect a program attempting execute/run and also most importantly how to allow/deny programs to execute/run. I'm sure we all have came across with UAC where it ask you to allow or deny that program from running, normally this for elevating … | |
i copied eclipse and its files of code into a new comp. i installed the latest version of java and went into eclipse. i ran the porgram and the code that worked just fine on my previous computer compiled but the applet was blank and it said "start: applet not … | |
public class Test { public static int f1( int m1 ) { return ( m1 + 1 ); } public static double f1( double m1 ) { return ( m1 * m1 ); } public static void main( String[] arg ) { double x1, x3; x1 = 2.0; x2 = … |
The End.