Thanks you very much, I am oblized.

I'm very new to Grails, so hopefully this isn't blind leading blind!

Below is the environment entries from my datasource.groovy
dev works ok against memorydb
prod works ok against MySQL running on a server with the noted IP address

However, I can't get "test" to run against MS Access. I can create a nice range of error messages, the most hopeful of which is currently
"Could not get JDBC Connection...(stuff deleted)...Cannot create PoolableConnectionFactory ([Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process blah Thread blah DBC blah Jet'

Can anyone advise whether this is configuration or permissions related and how I can resolve. I'm not sure if a DSN has to be created in Windows or whether a well formed datasource.groovy is sufficient?

Environment is "Corporate", Windows XP, JDK 1.6.18, Grails 1.2.1, using the jdbc.odbc driver included in the Java SDK (rt.jar). Using Cygwin because Command prompt is disabled, hence G: is also known as cygdrive/g

HELP, please?

// environment specific settings
environments {
	development {
		dataSource {
			dbCreate = "create-drop" // one of 'create', 'create-drop','update'
			url = "jdbc:hsqldb:mem:devDB"
		}
	}
	test {
		dataSource {
			//pooled = false   // try explicitly setting this
			dbCreate = "update"
			driverClassName = "sun.jdbc.odbc.JdbcOdbcDriver"
			//url = "jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=G:/GENERAL/dev/testdb/qa.mdb;UID=;PWD=;"
			url = "jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=/cygdrive/g/GENERAL/dev/testdb/qa.mdb;UID=;PWD=;"
		}
	}
	production {
		dataSource {
			pooled = true
			dbCreate = "update"
			driverClassName = "com.mysql.jdbc.Driver"
			username = "Conference"
			password = "Conference"
			//url = "jdbc:hsqldb:file:prodDb;shutdown=true"
			url = "jdbc:mysql://10.242.71.190/ConferenceDB"
			
		}
	}
}

Edited 6 Years Ago by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).

Comments
zombioe master, thread hijacker

anyone mentioned 'google' yet?
boyz, what did you try yet? there are more 'use an access db in java' tutorials out there, then there are rumours about aliens abducting people.
sure, you can just copy-paste the sollution, but your (future)employer will want you to be able to figure it out for yourself sooner or later

I may be newbie to Grails/Java but that doesn't mean I am dumb ;-)
So, yes, I have googled a fair amount to get where I got to...

Update for interested parties is that the helpful msft error message could better be summarised as "insufficient privilege to access the Windows Registry, so get lost!".

I guess the thread could possibly be renamed to Windows/ODBC/Permissions... and I am now at the mercy of my Corporate IT helpdesk...

Update:
On a per UserID per PC basis I have been granted Full (Read/Write/Update) access to the ODBC entry in the Registry.

New Error is:
"Invocation of DatabaseMetaData method 'getDatabaseMajorVersion' failed"
From my googling it would appear that this is a JDBC/ODBC (I'm using the Sun JDBC/ODBC Bridge) or ODBC (Microsoft supplied) driver issue.

Think I'm going to try the EasySoft Bridge next...

This article has been dead for over six months. Start a new discussion instead.