Hi,
I was developing extensively with ODBC 1.x and 2.x for a couple of years and know also ADO from a couple of VB6 applications I wrote.
The main difference between ODBC and ADO is the interface:
ODBC is a C style API (using a handle mechanism to represent and access Connections, Recordsets, ...)
ADO is a OLE-based set of Classes, thus more the object oriented way
Also, ADO can use an ADO to ODBC bridge so the question ADO or ODBC is more a question of which interface you want to use.
And can use.
Both ODBC and ADO can be configured on the datasource part in various ways, using predefined data sources or using a connect string that allows to do connections completely configuration free, as long as the drivers in question do support this. The ones for the SQLServer do.
So actually no datasource registration is required.
About mxODBC: has anyone have success to use it with SQLServer2000? We tried it but run into runtime errors, at least with the test suite provided.
As we try to move from VB to Python as much as we can, we are also interested in any tips and tricks on how to use ODBC and ADO with Python.
We are looking for production-quality samples, it looks like this is a white area within Python (and in the books we read on it).
Peter
> -----Ursprüngliche Nachricht-----
> Von: Andy Robinson [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 9. März 2001 10:24
> An: Barry Scott; Mark Ainsworth
> Cc: [EMAIL PROTECTED]
> Betreff: RE: using SQL
>
>
> >
> >
> > I have your book and read your recomendations. At work on the
> > other hand ODBC is not seen as the way to go we use ADO.
>
> Things move on... if working with Microsoft databases then
> ADO and COM interfaces make a lot of sense and will give
> you all the latest features. I doubt there is a performance
> benefit.
>
> However, if want to get at Sybase/Oracle or a dozen other
> database engines then you can almost alway find an ODBC driver.
> I do a lot of cross-platform work for big corporates where we can
> develop on a local windows box and run on Unix; Python's
> consistent DB API makes this very easy.
>
> > For Python I'm also reading up on ADO to see how it compares
> > to the odbc approach.
> >
> > One thing I did not want to do was have to do sys admin to
> > setup ODBC. With ADO I can pass it the access info from within
> > my app.
>
> Actually you can register ODBC data sources at run time
> yourself; I cannot remember the API calls but have done it before.
> So you can ship an app which needs no configuration. mxODBC
> does not expose this AFAIK but it can be done with the windows
> extensions.
>
> > BArry
> > p.s.
> > Where in the U.K are you based?
> London - Wimbledon
> _______________________________________________
> ActivePython mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activepython
>