Difference between revisions of "Connecting To SQL Server"

From PresenceWiki
Jump to: navigation, search
Line 8: Line 8:
 
This can be found in the sqljdbc.jar (or sqljdbc4.jar for Java version 6 which Presence 3.5.5 uses).
 
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  
+
Import the jar via Presence - Tools - Jar Manager and then browse to the SQLServerDriver class.
  
And the connection URL takes the form:-
+
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:-
+
After hitting test and using the correct username and password you should see the following:-
  
 
http://www.international-presence.com/images/docs/jdbc/sqlconnect.png  
 
http://www.international-presence.com/images/docs/jdbc/sqlconnect.png  
  
http://www.international-presence.com/images/docs/jdbc/sqlresults.png
+
You can then use the Resource withing Presence in the SQL node.
  
 +
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.4 uses the java 1.5 JVM which in turn will need the sqljdbc.jar

Revision as of 19:45, 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 Presence - Tools - Jar Manager and then browse to the SQLServerDriver class.

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

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

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

You can then use the Resource withing Presence in the SQL node.

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.