1 |
|
# |
2 |
|
# This file is part of GNU Enterprise. |
3 |
|
# |
4 |
|
# GNU Enterprise is free software; you can redistribute it |
5 |
|
# and/or modify it under the terms of the GNU General Public |
6 |
|
# License as published by the Free Software Foundation; either |
7 |
|
# version 2, or(at your option) any later version. |
8 |
|
# |
9 |
|
# GNU Enterprise is distributed in the hope that it will be |
10 |
|
# useful, but WITHOUT ANY WARRANTY; without even the implied |
11 |
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
12 |
|
# PURPOSE. See the GNU General Public License for more details. |
13 |
|
# |
14 |
|
# You should have received a copy of the GNU General Public |
15 |
|
# License along with program; see the file COPYING. If not, |
16 |
|
# write to the Free Software Foundation, Inc., 59 Temple Place |
17 |
|
# - Suite 330, Boston, MA 02111-1307, USA. |
18 |
|
# |
19 |
|
# Copyright 2000-2003 Free Software Foundation |
20 |
|
# |
21 |
|
|
22 |
|
__description__ = _("ADO-DB Data Driver for MS SQL-Server/Access") |
23 |
|
__driverurl__ = "http://sourceforge.net/projects/adodbapi" |
24 |
|
|
25 |
|
__doc__ = _(""" |
26 |
|
Supported attributes (via connections.conf or <database> tag)""") + """ |
27 |
|
|
28 |
|
oledb_provider (required) |
29 |
|
data_source (required) |
30 |
|
initial_catalog (optional for SQL Server) |
31 |
|
network_library (optional for SQL Server) |
32 |
|
data_provider (optional for SQL Server)""" + _(""" |
33 |
|
|
34 |
|
You can find more connection strings here:""") + """ |
35 |
|
http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm |
36 |
|
""" |
37 |
|
|
38 |
|
__examples__ = """ |
39 |
|
[access] |
40 |
|
comment = """ + _("MS Access database") + """ |
41 |
|
provider = adodbapi |
42 |
|
oledb_provider = Microsoft.Jet.OLEDB.4.0 |
43 |
|
data_source = C:\mydb.mdb |
44 |
|
|
45 |
|
[sqlserver] |
46 |
|
comment = """ + _("MS SQL Server database") + """ |
47 |
|
provider = adodbapi |
48 |
|
oledb_provider = sqloledb |
49 |
|
data_source = myServerName |
50 |
|
initial_catalog = myDatabaseName |
51 |
|
""" |
52 |
|
|
53 |
|
|
54 |
|
# |
55 |
|
# Stub code to not initialize the Connection until needed. |
56 |
|
# This greatly helps with error messages. |
57 |
|
# |
58 |
|
def Connection(*args, **parms): |
59 |
|
from Driver import Connection as C |
60 |
|
return C(*args, **parms) |
61 |
|
|