PDA

View Full Version : How do I configure DbProvider for MS Access database?


rolandz
06-28-2007, 08:03 PM
Hi,

I want to have a DbProvider (Spring.Data.Common.DbProvider, Spring.Data) being configured for MS Access database. How do I do it?

Although I can prepare some parameters by myself, there are quite a lot of them that I don't understand clearly. These are:


bindByName
ErrorCodes.badSqlGrammarCodes
ErrorCodes.DataAccessResourceFailureCodes
ErrorCodes.DataIntegrityViolationCodes
ErrorCodes.CannotAcquireLockCodes
ErrorCodes.DeadlockLoserCodes
errorCodeExceptionExpression constructor argumentWhat happens if I don't provide them? Perhaps they're somewhat optional?

Mark Pollack
06-28-2007, 08:30 PM
Hi Roland,

No need to write your own. You should use the the OLE DB provider that is already configured out of the box. You can reference it by the provider names 'OleDb-2.0' (for .NET 2.0) or 'OleDb-1.1'. (.NET 1.1). See the docs (http://www.springframework.net/doc-latest/reference/html/dbprovider.html)for exact usage. Connection strings for Access can be found here (http://www.connectionstrings.com/?carrier=access).

Cheers,
Mark

rolandz
06-29-2007, 10:07 AM
Thanks - works perfectly :)