Newbee Question: Problem with mSQL driver 
Author Message
 Newbee Question: Problem with mSQL driver

I'm following an example in Reese trying to get a JDBC driver
going. The code seems to find the driver find and load.

Enumeration gives:

But the DriverManager.getConnection throws an error saying:
"java.sql.sqlException: No Suitable driver"

Why is it not finding the driver?

Thanks in advance for any help.
(My code is below)

Owen

_______________________________________________________________

/* $Id: Select.java,v 2.3 1999/01/20 20:49:56 borg Exp $ */

import java.sql.*;
import java.util.*;

/**
* Last modified $Date: 1999/01/20 20:49:56 $

*/
public class Class1 {
public static void main(String argv[]) {
try {
String url = "jdbc:msql://carthage.imaginary.com:1114/test";
String url2= "jdbc:msql:/F:/mSQL";
Properties p = new Properties();
Connection con;
Statement stmt;
ResultSet rs;

//p.put("user", "borg");

Class.forName("com.imaginary.sql.msql.MsqlDriver");

for (Enumeration e = java.sql.DriverManager.getDriver () ;
e.hasMoreElements() ;) {
System.out.println(e.nextElement());

Quote:
}

//******* prints out....

con = DriverManager.getConnection(url2, "", "");

//******* error message..
//******* java.sql.sqlException: No Suitable driver



Wed, 25 Jun 2003 07:27:46 GMT
 Newbee Question: Problem with mSQL driver

Hi !

Your second url seems strange, it seems that you want to call a file, but
msql is working with network access (like with your first url, that contains
a server name, and a port).

No suitable driver means that it cannot find a driver corresponding to the
url you want to use.
So check the url (you will find examples with the jdbc driver, read them).

HTH
Sbastien.



Quote:

> I'm following an example in Reese trying to get a JDBC driver
> going. The code seems to find the driver find and load.

> Enumeration gives:

> But the DriverManager.getConnection throws an error saying:
> "java.sql.sqlException: No Suitable driver"

> Why is it not finding the driver?

> Thanks in advance for any help.
> (My code is below)

> Owen

> _______________________________________________________________

> /* $Id: Select.java,v 2.3 1999/01/20 20:49:56 borg Exp $ */

> import java.sql.*;
> import java.util.*;

> /**
> * Last modified $Date: 1999/01/20 20:49:56 $

> */
> public class Class1 {
> public static void main(String argv[]) {
> try {
> String url = "jdbc:msql://carthage.imaginary.com:1114/test";
> String url2= "jdbc:msql:/F:/mSQL";
> Properties p = new Properties();
> Connection con;
> Statement stmt;
> ResultSet rs;

> file://p.put("user", "borg");

> Class.forName("com.imaginary.sql.msql.MsqlDriver");

> for (Enumeration e = java.sql.DriverManager.getDriver () ;
> e.hasMoreElements() ;) {
> System.out.println(e.nextElement());
> }

> file://******* prints out....

> con = DriverManager.getConnection(url2, "", "");

> file://******* error message..
> file://******* java.sql.sqlException: No Suitable driver



Wed, 25 Jun 2003 08:01:50 GMT
 Newbee Question: Problem with mSQL driver
Where should I find the mySQL driver?
I wish someone tell me this questoin
best regards.
WeiJun Xiong


Wed, 25 Jun 2003 23:30:12 GMT
 Newbee Question: Problem with mSQL driver
Quote:

>Hi !

>Your second url seems strange, it seems that you want to call a
file, but
>msql is working with network access (like with your first url,
that contains
>a server name, and a port).

>No suitable driver means that it cannot find a driver

corresponding to the
Quote:
>url you want to use.
>So check the url (you will find examples with the jdbc driver,
read them).

>HTH
>S|bastien.


crit dans le

>> I'm following an example in Reese trying to get a JDBC driver
>> going. The code seems to find the driver find and load.

>> Enumeration gives:

>> But the DriverManager.getConnection throws an error saying:
>> "java.sql.sqlException: No Suitable driver"

>> Why is it not finding the driver?

>> Thanks in advance for any help.
>> (My code is below)

>> Owen

_______________________________________________________________

- Show quoted text -

Quote:

>> /* $Id: Select.java,v 2.3 1999/01/20 20:49:56 borg Exp $ */

>> import java.sql.*;
>> import java.util.*;

>> /**
>> * Last modified $Date: 1999/01/20 20:49:56 $

>> */
>> public class Class1 {
>> public static void main(String argv[]) {
>> try {
>> String url = "jdbc:msql://carthage.imaginary.com:1114/test";
>> String url2= "jdbc:msql:/F:/mSQL";
>> Properties p = new Properties();
>> Connection con;
>> Statement stmt;
>> ResultSet rs;

>> file://p.put("user", "borg");

>> Class.forName("com.imaginary.sql.msql.MsqlDriver");

>> for (Enumeration e = java.sql.DriverManager.getDriver () ;
>> e.hasMoreElements() ;) {
>> System.out.println(e.nextElement());
>> }

>> file://******* prints out....

>> con = DriverManager.getConnection(url2, "", "");

>> file://******* error message..
>> file://******* java.sql.sqlException: No Suitable driver



Wed, 25 Jun 2003 23:33:27 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Newbee question - Many-to-Many in mSQL

2. newbee Jdbc-Odbc bridge driver with MS-Access

3. JDBC driver for mSQL with working PreparedStatement

4. JDBC driver for msql

5. JDBC driver for mSQL

6. JDBC Driver: mSQL-JDBC 1.0a3 Released

7. Connection Failed - mSQL/Imaginary JDBC driver

8. jdbc driver for mSQL

9. in search of JDBC driver for mSQL

10. mSQL ODBC DRIVER

11. Imaginary driver for Msql

12. Win95/NT ODBC drivers for mSQL-2


 
Powered by phpBB® Forum Software