cardinal_pythonlib.register_db_with_odbc


Original code copyright (C) 2009-2022 Rudolf Cardinal (rudolf@pobox.com).

This file is part of cardinal_pythonlib.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Creates/registers an Access database via ODBC.

See

cardinal_pythonlib.register_db_with_odbc.create_and_register_access2000_db(filename: str, dsn: str, description: str) → bool[source]

(Windows only.) Creates a Microsoft Access 2000 database and registers it with ODBC.

Parameters:
  • filename – filename of the database to create
  • dsn – ODBC data source name to create
  • description – description of the database
Returns:

was the DSN created?

Return type:

bool

cardinal_pythonlib.register_db_with_odbc.create_and_register_access97_db(filename: str, dsn: str, description: str) → bool[source]

(Windows only.) Creates a Microsoft Access 97 database and registers it with ODBC.

Parameters:
  • filename – filename of the database to create
  • dsn – ODBC data source name to create
  • description – description of the database
Returns:

was the DSN created?

Return type:

bool

cardinal_pythonlib.register_db_with_odbc.create_and_register_access_db(filename: str, dsn: str, description: str) → bool[source]

(Windows only.) Creates a Microsoft Access database and registers it with ODBC.

Parameters:
  • filename – filename of the database to create
  • dsn – ODBC data source name to create
  • description – description of the database
Returns:

was the DSN created?

Return type:

bool

cardinal_pythonlib.register_db_with_odbc.create_sys_dsn(driver: str, **kw) → bool[source]

(Windows only.) Create a system ODBC data source name (DSN).

Parameters:
  • driver – ODBC driver name
  • kw – Driver attributes
Returns:

was the DSN created?

Return type:

bool

cardinal_pythonlib.register_db_with_odbc.create_user_dsn(driver: str, **kw) → bool[source]

(Windows only.) Create a user ODBC data source name (DSN).

Parameters:
  • driver – ODBC driver name
  • kw – Driver attributes
Returns:

was the DSN created?

Return type:

bool

cardinal_pythonlib.register_db_with_odbc.register_access_db(fullfilename: str, dsn: str, description: str) → bool[source]

(Windows only.) Registers a Microsoft Access database with ODBC.

Parameters:
  • fullfilename – filename of the existing database
  • dsn – ODBC data source name to create
  • description – description of the database
Returns:

was the DSN created?

Return type:

bool