Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open

Hello,
I'am new in Talend and I have a problem to integrate Talend generate java code in my program (IDE : netbeans).
I have two files : a excel file and a access file. I want to insert the path of this file in parameters.
My code is :
   
public static void importData (String excelPath, String accessPath){
String [] context = {"--context_param ExcelPath=C:/Users/Nat/Desktop/Template.xlsx","--context_param AccessPath=C:/Users/Nat/Desktop/DB.accdb"};
ImportExcelToAccessSimpleTemplate.main(context);
}

This line provide me the following exception : java.sql.SQLException: General error Unable to open registry key Temporary (volatile) Ace DSN
If I remove context-param to my talend job and write path directly on my tAccessConnection etc, it works...
Someone have an idea to solve this issue ?
Thanks,
Best regards,
Labels (3)
2 Replies
Anonymous
Not applicable
Author

I have find the solution :
    public static void main(String[] args) {
String [] context = {"--context=Default","--context_param ExcelPath=C:/Users/Nat/Desktop/Template.xlsx","--context_param AccessPath=C:/Users/Nat/Desktop/DB.accdb"};
ImportExcelToAccessSimpleTemplate.main(context);
}

I have inserted file Default.properties in netbeans 🙂
Anonymous
Not applicable
Author

Hi
Great! Glad to see you have fixed it!
Regards,
Pedro