Tuesday, May 27, 2008

This is my code

public class Main {


public static void main(String[] args) {

Connection myConnection;

System.out.println("Sample db connectivity using MySQL and netbeans");


try{

Class.forName("com.mysql.jdbc.Driver");
myConnection=DriverManager.getConnection(
"jdbc:mysql://localhost:3306/sample"-"nbenavidez"-"password"
);
}
catch(Exception e){
System.out.println("Failed to get connection - This is BSSSSS");
e.printStackTrace();
}



}

}
the error :

Failed to get connection - This is BSSSSS
java.lang.ClassNotFoundException: com.mysql.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 dbsample.Main.main(Main.java:28)
I have the connector in place (the jar file) and it does compile fine also

i know that MS SQL can support around 250-000 and ORACLE can do around 500-000-1MIL- but i dont know about MySQL?
appreciate the help!

THANKS :)

If I have this table- how do I select only 1 row each? for example 1 from felipe and 1 from pedro:

id name value
--------------
1 felipe 2
2 felipe 4
3 felipe 3
4 pedro 3
5 pedro 6
6 pedro 2

thanks for any help
The table has more than 30000 rows- some items are repeated 3 times some 20 times- I just need 1 per item

thank you all for the time

I have used these: MS office â€" Word- Excel- PowerPoint- Publisher- Exchange- Outlook (both forms) â€" Windows and Mac OS- Open Office â€" Linux- Adobe Acrobat Professional â€" All OS (including Linux implementation)- FileMaker Pro 7 (last version I’ve used)- Dreamweaver- Flash- MySQL- PHP- Apache- Unix- Ruby (coding)- PERL (don’t ask me ‘cause I forget but- I’ve done it before…LONG TIME AGO when I had no life)- Redhat- Fedora- Debian- Mepis- Mandrake. Omni-Graffle- Sound Designer Pro- Pro Tools- Custom designed Sound and Light grids using Visio and Concept Draw- Web html apps- XML
Batch mod â€" unix permissions

Plus hardware support- 3 com switches and routers
Linksys and Cisco Managed switches- routers- Networking Patching- Nortel PBX Switching schemes and management console software- Wireless Access Points â€" Linksys- Dlink- Netgear- Oronico- Apple Airport

Not too mention the telecommunications end user support.

How do I put all this into a resume succinctly? HELP!

I reinstalled mysql and it uses the same password- how can i remove that password?

im trying to make a maplestpory server but i cant get make a Registration link.

No comments: