Hi Clive
try using as driver:
com.microsoft.sqlserver.jdbc.SQLServerDriver
and as connection URL:
jdbc:sqlserver://your_connection_data
these work for me.
HTH
Guido
Clive_ schrieb:
> Hi,
>
[quoted text clipped - 41 lines]
> }
> }
> // Step 1: Load the JDBC driver.
> String driver="com.microsoft.sqlserver.SQLServerDriver";
[quoted text clipped - 12 lines]
> System.err.println("Got an exception! ");
> System.err.println(e.getMessage());
A few things to check:
1. is "com.microsoft.sqlserver.SQLServerDriver" the nameof the driver,
case sensitive?
2. is the name of the property "user" rather "userid" etc. case
sensitive.
3. You have a BLANK password. This is not the same as an empty
password. In examples I put the word "sesame" to indicate a password
without revealing the real one. This is a reference to the Arabian
Nights story, Ali Baba and the Forty Thieves most children read in my
generation. It is unlikely to be confused with a keyword.
4. Is /K0322608 the nameof the host where the SQL database lives?
5. double check you are supposed to write microsoft:sqlserver: not
microsoft.sqlserver: or similar.
6. add an e.printStackTrace (System.err) to localise just what is
happening.
7. print e so you can find out precisely what sort of exception you
got.
The problem is there is so much specific-to-your case information in
that snippet, only you can check it is correct.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Lew - 16 Jul 2007 21:56 GMT
Clive_ wrote, quoted or indirectly quoted someone who said :
>> // Step 1: Load the JDBC driver.
>> String driver="com.microsoft.sqlserver.SQLServerDriver";
[quoted text clipped - 12 lines]
>> System.err.println("Got an exception! ");
>> System.err.println(e.getMessage());
> The problem is there is so much specific-to-your case information in
> that snippet, only you can check it is correct.
To the OP: It would also help if you provided the error message you saw,
copied and pasted, not retyped. Consider providing an SSCCE in future.
<http://www.physci.org/codes/sscce.html>
<http://mindprod.com/jgloss/sscce.html>
(part of <http://mindprod.com/jgloss/newsgroups.html>)

Signature
Lew