What is an Ignore list?
suitable driver not found
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > PostgreSQL database development > suitable driver not found 4 September 2009 18:45:44

  Top users: 
  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

suitable driver not found

Rajitha M 9 December 2004 09:08:37
 The code given below gives an exception as:
a suitable driver not found.

I am not working on a network, it is a simple stand alone PC.

Which SqlDriverr would be suitable,I am using SqlServerDriverfor SQl database 7.0,j2sdk1.41_01 and have installed SqlServerDriver driver sqlserverdriver.jar­

and put it in j2sdk1.41_01/jre/li­b/ext/sqlserverdrive­r.jar and then set the classpath
but while running this program i am getting the error like:

classnotfound exception:java.lang­.classnotfoundexcept­ion:com.microsoft.jd­bc.sql
server:SqlServerDri­ver
sqlexception:java.s­ql.sqlexception:no suitabledriver

and code is:

import java.sql.*;
import javax.sql.*;
import java.io.*;
import java.lang.*;
public class connect
{ public static void main(String[] args)
{ String url = "jdbc:microsoft:sql­server://idealab5.cs­.uiowa.edu:1433;Data­baseName=Entertainme­nt;";
// here Entertainment is database name
String uid = "admin";
String pw = "";
try { // Load driver class
Class.forName("com.­microsoft.jdbc.sqlse­rver.SQLServerDriver­");
}
catch (java.lang.ClassNot­FoundException e) {
System.err.println(­"ClassNotFoundExcept­ion: " +e);
}
Connection con = null;
try {
con = DriverManager.getCo­nnection(url,uid,pw)­;
Statement stmt = con.createStatement­();
ResultSet rst = stmt.executeQuery("­SELECT * FROM USERS");
//System.out.printl­n("Product Name, Price");
while (rst.next())
{ System.out.println(­rst.getString(1));//­+","+rst.getDouble(2­));
}
}
catch (SQLException ex)
{
System.err.println(­"SQLException: " + ex);
}
finally
{
if (con != null)
try
{
con.close();
}
catch (SQLException ex)
{
System.err.println(­"SQLException: " + ex);
}
}
}
}








-------------------­--------------
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
Add comment
Poonam Talreja 31 January 2004 13:33:57 permanent link ]
 
The code given below gives an exception as:
a suitable driver not found.

I am not working on a network, it is a simple stand alone PC.

Which jdbc driver would be suitable,I am using postgreSQL 7.3,j2sdk1.4.2 and have installed jdbc driver pg73jdbc3.jar

import java.sql.*;
class mycon{
public static void main (String args[]) {


try{
Class.forName("org.­postgresql.Driver");­
String url="jdbc:p­ostgresq­l://127.0.0.1:5432/a­;
Connection con = DriverManager.getCo­nnection(url, "postgres", "");


}catch(ClassNotFoun­dException e) {
System.out.println(­"Exception");
System.out.println(­e.toString());
}
catch(SQLException e) {
System.out.println(­"Exception");
System.out.println(­e.toString());
}
}
}



-------------------­--------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
Add comment
Poonam Talreja 31 January 2004 13:53:25 permanent link ]
 The code given below gives an exception as:
a suitable driver not found.

I am not working on a network, it is a simple stand alone PC.

Which jdbc driver would be suitable,I am using postgreSQL 7.3,j2sdk1.4.2 and have installed jdbc driver pg73jdbc3.jar

import java.sql.*;
class mycon{
public static void main (String args[]) {


try{
Class.forName("org.­postgresql.Driver");­
String url="jdbc:p­ostgresq­l://127.0.0.1:5432/a­;
Connection con = DriverManager.getCo­nnection(url, "postgres", "");


}catch(ClassNotFoun­dException e) {
System.out.println(­"Exception");
System.out.println(­e.toString());
}
catch(SQLException e) {
System.out.println(­"Exception");
System.out.println(­e.toString());
}
}
}




-------------------­--------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
Add comment
aaaaa 22 May 2008 06:24:30 permanent link ]
 hello there,
I am working with postgreSQL for the first time.
I am trying to connect it with netBeans,
but it is giving an exception::
"driver class not found".
Could you please help me for this.
Add comment
Guest 20 May 2009 11:09:19 permanent link ]
 its not fare
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > PostgreSQL database development > suitable driver not found 4 September 2009 18:45:44

see also:
Layers and behaviors
Need to quickly build a site with…
Future of FrontPage
pass tests:
Do you really know yourself?
see also:
Watch DVD movies on Motorola droid to…
4 steps to Rip DVDs and Copy DVD Movies…

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .