MS의 Access MDB 파일을 Database 로 사용할 경우가 있는데요.
이때 Connection String 값을 정리해 보았습니다.
1. ODBC를 사용할 경우
- 일반적인 보안
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;
- Workgroup 보안
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;SystemDB=C:\mydatabase.mdw;
- Exclusive 보안
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Exclusive=1;Uid=admin;Pwd=;
- Enable admin statements
To enable certain programatically admin functions such as CREATE USER, CREATE GROUP, ADD USER, GRANT, REVOKE and DEFAULTS (when making CREATE TABLE statements) use this connection string.
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;ExtendedAnsiSQL=1
|
- Specifying locale identifier
Use this one to specify the locale identifier which can help with non-US formated dates.
2. OLE DB, OleDbConnection (.NET)을 사용할 경우
- 일반적인 보안
- With database password
This is the connection string to use when you have an access database protected with a password using the Set Database Password function in Access.
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;
- Workgroup (system database)
- Workgroup (system database) specifying username and password
- DataDirectory functionality