Difference between revisions of "Connecting To SQL Server"

From PresenceWiki
Jump to: navigation, search
Line 1: Line 1:
 +
The settings for your SQL Database Resource in Presence should be:-
 +
 
http://www.international-presence.com/images/docs/jdbc/sqlserverdetails.png  
 
http://www.international-presence.com/images/docs/jdbc/sqlserverdetails.png  
  
Driver class
+
Note, the driver class is:-
 
com.microsoft.sqlserver.jdbc.SQLServerDriver  
 
com.microsoft.sqlserver.jdbc.SQLServerDriver  
  
Connection URL
+
This can be found in the sqljdbc.jar (or sqljdbc4.jar for Java version 6 which Presence 3.5.5 uses).
 +
 
 +
Import the jar via the
 +
 
 +
And the connection URL takes the form:-
 
jdbc:sqlserver://ServerName:1433:databaseName=MyDatabase;  
 
jdbc:sqlserver://ServerName:1433:databaseName=MyDatabase;  
 +
 +
After hitting test and using the correct username and password you sghould see the following:-
  
 
http://www.international-presence.com/images/docs/jdbc/sqlconnect.png  
 
http://www.international-presence.com/images/docs/jdbc/sqlconnect.png  

Revision as of 19:44, 2 January 2010

The settings for your SQL Database Resource in Presence should be:-

http://www.international-presence.com/images/docs/jdbc/sqlserverdetails.png

Note, the driver class is:- com.microsoft.sqlserver.jdbc.SQLServerDriver

This can be found in the sqljdbc.jar (or sqljdbc4.jar for Java version 6 which Presence 3.5.5 uses).

Import the jar via the

And the connection URL takes the form:- jdbc:sqlserver://ServerName:1433:databaseName=MyDatabase;

After hitting test and using the correct username and password you sghould see the following:-

http://www.international-presence.com/images/docs/jdbc/sqlconnect.png

http://www.international-presence.com/images/docs/jdbc/sqlresults.png


Presence Version 3.5.4 uses the java 1.5 JVM which in turn will need the sqljdbc.jar
Presence Version 3.5.5 uses the java 1.6 JVM which in turn uses sqljdbc4.jar

As the Presence Jar Manager caches the classes you should restart the server if you have changed the location of a class.