mickyy's Profile
Reputation: 0
Apprentice
- Group:
- Members
- Active Posts:
- 18 (0.06 per day)
- Joined:
- 15-August 12
- Profile Views:
- 195
- Last Active:
Feb 20 2013 10:43 AM- Currently:
- Offline
Previous Fields
- Country:
- IN
- OS Preference:
- Windows
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Server -Client Connection
Posted 20 Feb 2013
Thanks pbl...
-
In Topic: making connection to java program using sql
Posted 20 Aug 2012
Still getting the error. I have tried this.
package javaapplication2; import java.sql.*; public class JavaApplication2 { public static void main(String args[]) { int i=0; try { String str="Select fname from students"; Class.forName("net.sourceforge.jtds.jdbc.Driver"); Connection con=DriverManager.getConnection("jdbc:jtds:sqlserver://monika-pc/mm"); System.out.println("Connection open"); Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery(str); System.out.println("fname\t"); while(i<3) { rs.next(); String lname=rs.getString("lname"); System.out.println(lname); i++; } con.close(); } catch(Exception ex) { ex.printStackTrace(); } } }
but I am getting the following error :
run: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at javaapplication2.JavaApplication2.main(JavaApplication2.java:12) BUILD SUCCESSFUL (total time: 1 second)
-
In Topic: making connection to java program using sql
Posted 19 Aug 2012
pbl, on 19 August 2012 - 07:41 PM, said:Sorry -1 to compensate a wrongly given +1
Its all right. I know my question is not much of intelligence but and I have never faced this problem in my 1.5 years of Java experience. Although I have posted my question about 3 days ago, still I don't got the answer . So,what's the benefit of getting reputations here. -
In Topic: making connection to java program using sql
Posted 19 Aug 2012
but by right clicking on MY COMPUTER , the name is " monika-pc" -
In Topic: making connection to java program using sql
Posted 19 Aug 2012
by writting " C:/>hostname" in cmd ,I am getting an error :
" 'hostname' is not recognized as an internal or external command,operable program or batch file. "
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Location:
- muzaffarnagar,UttarPradesh
- Full Name:
- Monika Bhatnagar
- Years Programming:
- 1
- Programming Languages:
- J2SE,J2EE,PL/QL
Contact Information
- E-mail:
- Click here to e-mail me
- Facebook:
- http://facebook.com/monika.bhatnagar
Friends
mickyy hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
mickyy has no profile comments yet. Why not say hello?