MDBtools ODBC Driver: Overriding Database
Florent Guerrier <[email protected]> Fri, 8 May 2015 13:52:38 -0400
| Newsgroups | gmane.comp.db.mdb-tools.devel |
|---|---|
| Message-ID | <CAJb95JGWZq37kkKTOd8fERVw2+TRigiK1pWiDkgb0UkjySq+SA@mail.gmail.com> |
--===============5062597985359693857==
Content-Type: multipart/alternative; boundary=089e0115f540a2af47051595b139
--089e0115f540a2af47051595b139
Content-Type: text/plain; charset=UTF-8
Hi,
I am trying to use the odbc driver
(mdbtools-devel,x86_64,0.6-0.7.cvs20051109.el6.1) with pyodbc:
*conn = pyodbc.connect('DSN=MDBDSN; Database=/myfolder/A.mbd')*
*cursor = conn.cursor()*
I understand a valid DSN is required, so I created one:
>more odbc.ini
*[MDBDSN]*
*Description = MDBDSN*
*Driver = MDBTools*
*Servername = localhost*
*Database=/myfolder/B.mdb*
And I have configured odbcinst:
>more odbcinst.ini
*[MDBTools]*
*Description = MDBTools*
*Driver = path/libmdbodbc.so*
*Setup = path/libmdbodbc.so*
*Driver64 = path/libmdbodbc.so*
*Setup64 = path/libmdbodbc.so*
*FileUsage = 1*
But no matter what I do (change the order, lowercase/uppercase database,
"Database", etc) I never get the cursor to query against "A.mdb" (from the
connection string). So it seems "Database" is not getting overridden... And
I would love to avoid having to rely on DSN for what I need to do!
To summarize: Is there anyway to get a DSN-less connection setup with the
ODBC Driver using pyodbc?
Thanks,
Flo
--089e0115f540a2af47051595b139
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi,<div><br></div><div>I am trying to use the odbc driver =
(mdbtools-devel,x86_64,0.6-0.7.cvs20051109.el6.1) with=C2=A0pyodbc:</div><d=
iv><br></div><div><i>conn =3D pyodbc.connect('DSN=3DMDBDSN; Database=3D=
/myfolder/A.mbd')<br></i></div><div><i>cursor =3D conn.cursor()</i><br>=
</div><div><br></div><div>I understand a valid DSN is required, so I create=
d one:</div><div>>more odbc.ini</div><div><i>[MDBDSN]</i></div><div><i>D=
escription =3D MDBDSN</i></div><div><i>Driver =3D MDBTools</i></div><div><i=
>Servername =3D localhost</i></div><div><i>Database=3D/myfolder/B.mdb</i></=
div><div><br></div><div><br></div><div>And I have configured odbcinst:</div=
><div><div>>more odbcinst.ini</div><div><i>[MDBTools]</i></div><div><i>D=
escription =3D MDBTools</i></div><div><i>Driver =C2=A0 =C2=A0 =C2=A0=3D pat=
h/libmdbodbc.so</i></div><div><i>Setup =C2=A0 =C2=A0 =C2=A0 =3D path/libmdb=
odbc.so</i></div><div><i>Driver64 =C2=A0 =C2=A0=3D path/libmdbodbc.so</i></=
div><div><i>Setup64 =C2=A0 =C2=A0 =3D path/libmdbodbc.so</i></div><div><i>F=
ileUsage =C2=A0 =3D 1</i></div></div><div><br></div><div><br></div><div>But=
no matter what I do (change the order, lowercase/uppercase database, "=
;Database", etc) I never get the cursor to query against "A.mdb&q=
uot; (from the connection string). So it seems "Database" is not =
getting overridden... And I would love to avoid having to rely on DSN for w=
hat I need to do!</div><div><br></div><div>To summarize: Is there anyway to=
get a DSN-less connection setup with the ODBC Driver using pyodbc?</div><d=
iv><br></div><div>Thanks,</div><div>Flo</div></div>
--089e0115f540a2af47051595b139--
--===============5062597985359693857==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
--===============5062597985359693857==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
mdbtools-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mdbtools-dev
--===============5062597985359693857==--