I have a need to create ODBC data-source programmatically. I have a script that worked on windows XP and now not working on windows 7
Details of the system and components.
1) Windows 7 64 bit
2) Ms Office
2010. (Tried with both 64 bit and then 32 bit) Also tried with Ms Office 2013.
3) Java 1.7 - 64 bit.
The below windows command is executed by java Runtime object. But this time even if I am runnning the below command on the windows command prompt, I see errors. Oroginally the data source was 2000 Access database format. As I was seeing errors, I have converted to 2002-2003 format, even then I see errors. I have also tried 2007 format, even then I see errors.
Syntax that I have ...
ODBCConf CONFIGSYSDSN "Microsoft Access Driver (*.mdb,*.accdb)" "DSN=SOURCE_2001|Server=C:\SOURCE2001.accdb"
I have also changed the above 'Server' attribute to 'DBQ' no luck. Over all I see the below error.
ONFIGSYSDSN: Unable to create a data source for the 'Microsoft Access Driver' driver:
Component not found in the registry with error code -2147467259
But when I change CONFIGSYSDSN - (System DSN) to CONFIGDSN - (User DSN) then it seems to work but then when Java code tried to access it it says architecture mismatch. Can't seem to find the root cause.