This is from the sun tutorial:
"You do not need to create an instance of a driver and register it with the
DriverManager because calling Class.forName will do that for you
automatically. If you were to create your own instance, you would be
creating an unnecessary duplicate, but it would do no harm.
When you have loaded a driver, it is available for making a connection with
a DBMS. "
What you likely have not done is go to the ODBC data source manager in the
Control Panel and create a new ODBC data source connected to the SQL Server.
If you create a data source name SqlSvr1 and set the default db to
Northwind, then use the con url "jdbc:odbc:SqlSvr1" to get the connection.
"kaeli" <tiny_one.TakeThisOut@NOSPAM.comcast.net> wrote in message
news:MPG.1b165e60c8a88f79989e64@nntp.lucent.com...
> In article <yelp666.16iso1.TakeThisOut@mail.codecomments.com>, yelp666.16iso1
> @mail.codecomments.com enlightened us with...
> >
> > My code:
> >
> >
> > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> > String url = "jdbc:odbc:Northwind";
> > java.sql.Connection con = java.sql.DriverManager.getConnection(url,
> > "test", "krowa");
> >
> > I appreciate any help.
> >
>
> You forgot to register the driver with DriverManager.
>
>
> --
> --
> ~kaeli~
> She was engaged to a boyfriend with a wooden leg but broke
> it off.
<font color=purple> > <a style='text-decoration: underline;' href="http://www.ipwebdesign.net/wildAtHeart</font" target="_blank">http://www.ipwebdesign.net/wildAtHeart</font</a>>
<font color=purple> > <a style='text-decoration: underline;' href="http://www.ipwebdesign.net/kaelisSpace</font" target="_blank">http://www.ipwebdesign.net/kaelisSpace</font</a>>
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Connecting to MS SQL problems