ODBC connectivity to SQL7.0 mdb, UNIX - ODBC Bridges 
Author Message
 ODBC connectivity to SQL7.0 mdb, UNIX - ODBC Bridges

G'day All,

A number of queries:

1. Windows connection via ODBC to a SQL mdb on NT Server 4.0
    I have been making a connection to our SQL7.0 mdb via ODBC after
having set up a 'DSN' in the 'ODBC Data Source Administrator' window..
Most of the examples I have viewed so far refer to this practice.
    i.e. >>>import odbc, dbi
          >>>mydb = odbc.odbc(dsn,uid,pwd)

It worries me though that this seems to create a "permanent" connection
to the database as there is an open port listening for any queries.

Does anyone have any sample code for connecting on the fly to a SQL7.0
mdb WITHOUT using the 'ODBC Data Source Administrator' to setup a
"permanent" DSN.

Having programmed in VB I simplly conect on the fly using ADO to our
SQ7.0 mdb. Can this be done with python using mxODBC?
    I believe so ! but can anyone help me with an example?

2. UNIX connectivity to SQL7.0 mdb on NT Server 4.0
    It seems that using ODBC - ODBC Bridge is the way to go but this is
after the NT problem.

I hope that this forum will provide some definitive answers for all us
'newbies' in regards to these important issues.

Regards

Peter Larbalestier
Down under



Tue, 09 Jul 2002 03:00:00 GMT  
 ODBC connectivity to SQL7.0 mdb, UNIX - ODBC Bridges

Quote:

> G'day All,

> A number of queries:

> 1. Windows connection via ODBC to a SQL mdb on NT Server 4.0
>     I have been making a connection to our SQL7.0 mdb via ODBC after
> having set up a 'DSN' in the 'ODBC Data Source Administrator' window..
> Most of the examples I have viewed so far refer to this practice.
>     i.e. >>>import odbc, dbi
>           >>>mydb = odbc.odbc(dsn,uid,pwd)

> It worries me though that this seems to create a "permanent" connection
> to the database as there is an open port listening for any queries.

> Does anyone have any sample code for connecting on the fly to a SQL7.0
> mdb WITHOUT using the 'ODBC Data Source Administrator' to setup a
> "permanent" DSN.

> Having programmed in VB I simplly conect on the fly using ADO to our
> SQ7.0 mdb. Can this be done with Python using mxODBC?
>     I believe so ! but can anyone help me with an example?

Not an example, but you can use the mxODBC ODBC.Windows.DriverConnect()
API to create a connection using all the options you need to specify
for the DSN... perhaps there is a way to tell the ODBC manager
to create a DSN on the fly simply by providing the file name ?!

Quote:
> 2. UNIX connectivity to SQL7.0 mdb on NT Server 4.0
>     It seems that using ODBC - ODBC Bridge is the way to go but this is
> after the NT problem.

You can do this in these ways:

1. Use one of the OpenLink or Merant (InterSolv) multi-tier
   driver sets

2. Use a ODBC-bridge such as the one sold by EasySoft

3. Write a Python server for your app which runs on NT and
   serves a client on the Unix machine (not as hard as you might
   expect -- see SocketServer.py).

Quote:
> I hope that this forum will provide some definitive answers for all us
> 'newbies' in regards to these important issues.

Me too ;-)

--
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/



Fri, 12 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. C4 and SQL7 beta - ODBC access

2. MDB password & ODBC

3. ODBC and .mdb application

4. Conversion of MDB to TPS - odbc error

5. JDBC-ODBC bridge for TopSpeed

6. mxODBC, EasySoft ODBC Bridge and numeric data types

7. ODBC and/or OLE DB connectivity

8. Memory leak when using database connectivity toolset and ODBC driver for MySQL

9. ODBC connectivity to Access!

10. Migrating to ODBC. (Convirtiendo a ODBC)

11. Access odbc driver in ODBC 3.0

12. Configure ODBC Data Source WITHOUT Using ODBC Administrator

 

 
Powered by phpBB® Forum Software