How to connect access with jdvp

Robert Holfeld June 30, 2013

Hello,

I want to read values from an access database with the jdvp. My problem is, I don't know how I have to configure the properties file. At the moment it looks like:

# The database connection parameters
database.driver=sun.jdbc.odbc.JdbcOdbcDriver
database.user=..
database.password=..
database.connection.url=jdbc:odbc:\\edom.ad.corp\data\Reports and Final Documentation\040_Database\Documentation.mdb

#database.connection.url=jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="\\edom.ad.corp\data\Reports and Final Documentation\040_Database\Documentation.mdb"

# Cache Timeout (= 15 minutes by default). The actual db is queried only once and then the results are kept in the cache for the given timeout. Uncomment the line below to change it.
#cache.timeout=900000

# The SQL Query that will be executed on the database; DocCode, SubjectNr, System, Status, SentLetter FROM Documents WHERE (((ValidityRev)="Valid")) ORDER BY DocNo
sql.query=SELECT DocNo, DocTitle,

# The column number (starting from 0) that contains the primary key of the returned data.
primarykey.column.number=0
# The pattern that should be used to render the data in view mode. Use {column_number} as placeholders. You can use HTML, but make sure you close your tags properly!
rendering.viewpattern={1} {2} from <a href="http://maps.google.com/maps?f=q&hl=nl&geocode=&q={3}, {4}">{3}, {4}</a>
# The pattern that should be used to render the data in edit mode. Use {column_number} as placeholders.
rendering.editpattern={2}, {1}
# The pattern that should be used to render the data in searcher. Use {column_number} as placeholders.
rendering.searchpattern={1} {2} ({0})
# This is used when sorting in the issue navigator. When not defined, the 'rendering.viewpattern' is used.
rendering.sortpattern={0} {1}
# Use 0 to have a combobox for editing, 1 to have AJAX-style input field, 2 for cascading select
edit.type=0
# Use 0 to have a list for searching, 1 to have AJAX-style input field
search.type=0
# The pattern that is used for the history and the activity view. If not specified, the 'rendering.viewpattern' is used. Note that you cannot use HTML.
rendering.changelog.viewpattern={1} {2}
# The pattern that is used for the pie chart, 2d filter statistics and single level group by. If not specified, the 'rendering.viewpattern' is used. Note that you cannot use HTML.
rendering.statistics.viewpattern={1} {2}

Want is my mistake? Is it actually possible to connect access content with jdvp custom field?

I have tried severel formes of the url but I get this errormessage:

2013-07-01 10:16:29,522 http-8080-9 ERROR rholfeld 616x211008x1 1tr4ic1 10.201.22.95 /secure/QuickEditIssue!default.jspa [jira.plugin.databasevalues.DatabaseRowCache] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
	at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
	at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
	at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)
	at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
	at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.deblauwe.jira.plugin.databasevalues.DatabaseRowCache.createConnection(DatabaseRowCache.java:385)
	at org.deblauwe.jira.plugin.databasevalues.DatabaseRowCache.queryDatabase(DatabaseRowCache.java:250)
	at org.deblauwe.jira.plugin.databasevalues.DatabaseRowCache.getDatabaseRowsFromDb(DatabaseRowCache.java:242)
	at org.deblauwe.jira.plugin.databasevalues.DatabaseRowCache.getDatabaseRowsFromDb(DatabaseRowCache.java:234)
	at org.deblauwe.jira.plugin.databasevalues.DatabaseRowCache.refreshCacheIfNeeded(DatabaseRowCache.java:114)
	at org.deblauwe.jira.plugin.databasevalues.DatabaseValuesViewHelper.refreshCacheIfNeeded(DatabaseValuesViewHelper.java:206)
	at org.deblauwe.jira.plugin.databasevalues.DatabaseValuesViewHelper.getHtmlForEdit(DatabaseValuesViewHelper.java:233)
	at sun.reflect.GeneratedMethodAccessor5545.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:234)
	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:203)
	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:89)
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
	....

Best Regards
Robert

1 answer

0 votes
Peter von Hofer June 30, 2013
This should solve your problem with spaces in database.connection.url http://stackoverflow.com/questions/3141053/jdbc-url-with-database-containing-spaces

Suggest an answer

Log in or Sign up to answer