I use TODBCConnection to connect/open MS-Access database (.mdb)... everything works great until I try to open Database inside directory having special characters in it's name.Access does not use odbc try to use ADO instead.
like 'D:\The Path to DB )\DB.mdb'
After searching and searching, I can't find way to make this work. (the same DB can be opened by MS-Access 2010 with no problem)
any help.
Could not connect with connection string "DRIVER={Microsoft Access Driver (*.mdb)};Dbq={D:\_Projects\SeesHelper\DATA\!SECG-ECO-2016.mdb};Uid=admin;Pwd=password;". ODBC error details: LastReturnCode: SQL_ERROR; Record 1: SqlState: HY000; NativeError: -1044; Message: [Microsoft][ODBC Microsoft Access Driver] Not a valid file name.; Record 2: SqlState: 01000; NativeError: 1; Message: [Microsoft][ODBC Microsoft Access Driver]General Warning Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x2154 Thread 0x230c DBC 0x677b4c4 Jet'.;
Could not connect with connection string "DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};Dbq={D:\_Projects\SeesHelper\DATA\!SECG-ECO-2016.mdb};Uid=admin;Pwd=password;". ODBC error details: LastReturnCode: SQL_ERROR; Record 1: SqlState: HY000; NativeError: 63; Message: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xb0c Thread 0x2104 DBC 0x13817434 Jet'.; Record 2: SqlState: HY000; NativeError: 63; Message: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xb0c Thread 0x2104 DBC 0x13817434 Jet'.; Record 3: SqlState: HY000; NativeError: -1044; Message: [Microsoft][ODBC Microsoft Access Driver] Not a valid file name.;
It also works with:Yes, I know... I was making statement, not asking; sorry for the confusion.
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\Dane\ADDemo.mdb;Persist Security Info=False
Only tip: Try enclose path in double quotes: "":thank you,, but unfortunately it doesn't work.
dbConnection.Params.Add('Dbq="' + UTF8ToCP1256(ADBPath) + '"');