Difference between revisions of "Connecting To Access"

From PresenceWiki
Jump to: navigation, search
Line 3: Line 3:
 
First create an odbc connection from Administrative Tools - Data Sources (ODBC)
 
First create an odbc connection from Administrative Tools - Data Sources (ODBC)
  
Create a new DSN, give it a name and then browse to you mdb file.
+
Create a new DSN, give it a name and then browse to your mdb file.
  
 
http://www.international-presence.com/images/docs/jdbc/odbcdetails.png  
 
http://www.international-presence.com/images/docs/jdbc/odbcdetails.png  

Revision as of 19:38, 2 January 2010

When connectiong to Access you can use the ODBC drivers

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

Create a new DSN, give it a name and then browse to your mdb file.

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

After this you will see your newly created connection in the list of DSNs

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

Now you should create a new SQL Database 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

The class sun.jdbc.odbc.JdbcOdbcDriver is part of the JRE so you should not have to import any external jars.

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