Difference between revisions of "Database Connectivity"

From PresenceWiki
Jump to: navigation, search
Line 1: Line 1:
 
Database Connectivity
 
Database Connectivity
  
--Access
+
 
 +
== Microsoft Access ==
  
 
When connectiong to Access you can use the ODBC drivers
 
When connectiong to Access you can use the ODBC drivers
  
First create an odbc connection from Administrative Tools - DAta Sources (ODBC)
+
First create an odbc connection from Administrative Tools - Data Sources (ODBC)
  
 
http://www.international-presence.com/images/docs/jdbc/odbcdetails.png  
 
http://www.international-presence.com/images/docs/jdbc/odbcdetails.png  
Line 14: Line 15:
  
 
http://www.international-presence.com/images/docs/jdbc/accessdetails.png  
 
http://www.international-presence.com/images/docs/jdbc/accessdetails.png  
 +
 +
Note, the driver class is sun.jdbc.odbc.JdbcOdbcDriver
 +
and the connection url is jdbc:odbc:yourdsn
  
 
Hit test, to check the connection:-
 
Hit test, to check the connection:-
Line 23: Line 27:
 
http://www.international-presence.com/images/docs/jdbc/accessresults.png  
 
http://www.international-presence.com/images/docs/jdbc/accessresults.png  
  
--SQL Server  
+
== Microsoft SQL Server ==
 
+
  
 
http://www.international-presence.com/images/docs/jdbc/sqlserverdetails.png  
 
http://www.international-presence.com/images/docs/jdbc/sqlserverdetails.png  
 
http://www.international-presence.com/images/docs/jdbc/sqlconnect.png
 
 
http://www.international-presence.com/images/docs/jdbc/sqlresults.png
 
 
  
 
Driver class
 
Driver class
use the sun.jdbc.odbc.JdbcOdbcDriver
+
com.microsoft.sqlserver.jdbc.SQLServerDriver
  
 
Connection URL
 
Connection URL
jdbc:odbc:yourdsn
+
jdbc:sqlserver://ServerName:1433:databaseName=MyDatabase;
  
In windows, create a dsn by
+
http://www.international-presence.com/images/docs/jdbc/sqlconnect.png
ODBC Data Source Administrator
+
System DSN name (in this case yourdsn)
+
  
SQL Server
+
http://www.international-presence.com/images/docs/jdbc/sqlresults.png
 
+
Driver class
+
com.microsoft.sqlserver.jdbc.SQLServerDriver
+
 
+
Connection URL
+
jdbc:sqlserver://ServerName:1433:databaseName=MyDatabase;
+
  
 
Presence Version 3.5.4 uses the java 1.5 JVM. The jars for this can be downloaded from:-
 
Presence Version 3.5.4 uses the java 1.5 JVM. The jars for this can be downloaded from:-
  
sqljdbc.jar  
+
sqljdbc.jar then added via the jar manager which should point to
 
+
then added via the jar manager which should point to
+
  
 
Presence Version 3.5.5 uses the java 1.6 JVM. Because of this, if you are using SQLServer connections you will need to use the appropriate jars:-
 
Presence Version 3.5.5 uses the java 1.6 JVM. Because of this, if you are using SQLServer connections you will need to use the appropriate jars:-
Line 61: Line 49:
 
sqljdbc4.jar
 
sqljdbc4.jar
  
then added via the jar manager which should point to
+
As the Presence Jar Manager caches the classes you should restart the server if you have changed the
 +
location of a class.

Revision as of 19:09, 2 January 2010

Database Connectivity


Microsoft Access

When connectiong to Access you can use the ODBC drivers

First create an odbc connection from Administrative Tools - Data Sources (ODBC)

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

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

After this create an SQL resource in Presence, with the following settings:-

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

Note, the driver class is sun.jdbc.odbc.JdbcOdbcDriver and the connection url is jdbc:odbc:yourdsn

Hit test, to check the connection:-

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

You can then use this resource in the SQL node.

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

Microsoft SQL Server

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

Driver class com.microsoft.sqlserver.jdbc.SQLServerDriver

Connection URL jdbc:sqlserver://ServerName:1433:databaseName=MyDatabase;

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. The jars for this can be downloaded from:-

sqljdbc.jar then added via the jar manager which should point to

Presence Version 3.5.5 uses the java 1.6 JVM. Because of this, if you are using SQLServer connections you will need to use the appropriate jars:-

sqljdbc4.jar

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