Connecting to SQL Server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Connecting to SQL Server

Ryan Puddephatt-3

Hi all,

                I’m trying to connect to MS SQL Server, but can’t get the datasource right. I’d prefer to connect directly to the DB, but I’d settle for ODBC. Could someone  point me in the right direction, I currently have

 

<datasource>

  <driver-class-name>org.hsqldb.jdbcDriver</driver-class-name>

  <uri>jdbc:odbc:test</uri>

  <username>sa</username>

  <password/>

</datasource>

 

But get the following error message

 

java.sql.SQLException “No suitable driver”

 

Thanks

 

Ryan

 

-----------------------------------------------

Ryan Puddephatt

FIX Developer

Fidessa LatentZero

1 Alfred Place

London WC1E 7EB

Office: +44 (0) 20 7462 4200

Direct: +44 (0) 20 7323 6112

Blackberry: +44 (0) 79 8539 2458

Fax: +44 (0) 20 7462 4242

Email: [hidden email]

Web: http://www.latentzero.com

 


_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Connecting to SQL Server

Alexander Žaťko
Ryan, I have been using jtds driver to connect to MS SQL Server: http://jtds.sourceforge.net/

Just drop the jtds jar file to the tomcat/common/lib/ directory and restart. My datasource snippet looks like this:

 <datasource>
   <driver-class-name>net.sourceforge.jtds.jdbc.Driver</driver-class-name>
   <uri>jdbc:jtds:sqlserver://localhost:1433;DatabaseName=whatever</uri>
   <username>sa</username>
   <password></password>
 </datasource>

A.

On Jun 20, 2008, at 5:05 PM, Ryan Puddephatt wrote:

Hi all,
                I’m trying to connect to MS SQL Server, but can’t get the datasource right. I’d prefer to connect directly to the DB, but I’d settle for ODBC. Could someone  point me in the right direction, I currently have
 
<datasource>
  <driver-class-name>org.hsqldb.jdbcDriver</driver-class-name>
  <uri>jdbc:odbc:test</uri>
  <username>sa</username>
  <password/>
</datasource>
 
But get the following error message
 
java.sql.SQLException “No suitable driver”
 
Thanks
 
Ryan
 
-----------------------------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
 

_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visithttp://www.mci.com

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: Connecting to SQL Server

Ryan Puddephatt-3

Alex,

                Thanks that works perfectly

 

Ryan

 

-----------------------------------------------

Ryan Puddephatt

FIX Developer

Fidessa LatentZero

1 Alfred Place

London WC1E 7EB

Office: +44 (0) 20 7462 4200

Direct: +44 (0) 20 7323 6112

Blackberry: +44 (0) 79 8539 2458

Fax: +44 (0) 20 7462 4242

Email: [hidden email]

Web: http://www.latentzero.com

 

From: Alexander Zatko [mailto:[hidden email]]
Sent: 20 June 2008 16:19
To: [hidden email]
Subject: [ops-users] Re: Connecting to SQL Server

 

Ryan, I have been using jtds driver to connect to MS SQL Server: http://jtds.sourceforge.net/

 

Just drop the jtds jar file to the tomcat/common/lib/ directory and restart. My datasource snippet looks like this:

 

 <datasource>

   <driver-class-name>net.sourceforge.jtds.jdbc.Driver</driver-class-name>

   <uri>jdbc:jtds:sqlserver://localhost:1433;DatabaseName=whatever</uri>

   <username>sa</username>

   <password></password>

 </datasource>

 

A.

 

On Jun 20, 2008, at 5:05 PM, Ryan Puddephatt wrote:



Hi all,

                I’m trying to connect to MS SQL Server, but can’t get the datasource right. I’d prefer to connect directly to the DB, but I’d settle for ODBC. Could someone  point me in the right direction, I currently have

 

<datasource>

  <driver-class-name>org.hsqldb.jdbcDriver</driver-class-name>

  <uri>jdbc:odbc:test</uri>

  <username>sa</username>

  <password/>

</datasource>

 

But get the following error message

 

java.sql.SQLException “No suitable driver”

 

Thanks

 

Ryan

 

-----------------------------------------------

Ryan Puddephatt

FIX Developer

Fidessa LatentZero

1 Alfred Place

London WC1E 7EB

Office: +44 (0) 20 7462 4200

Direct: +44 (0) 20 7323 6112

Blackberry: +44 (0) 79 8539 2458

Fax: +44 (0) 20 7462 4242

Email: [hidden email]

 


_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visithttp://www.mci.com

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws