Connecting To SQL Server

From PresenceWiki
Revision as of 19:45, 2 January 2010 by Graham (Talk | contribs)

Jump to: navigation, search

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.