Re: ODBC links?

2007-11-12 Thread Johannes Findeisen
On Mon, 2007-11-12 at 10:13 +, Mr. Connolly wrote: > Lo' there. I'm a new user of Python, what I'm looking for is an easy way to > create ODBC links to Access databases (obviously, Access isn't the best > database out there I can use, but its easiest to just piece together for > this quick p

Re: odbc module for python

2007-07-19 Thread Tim Golden
Steve Holden wrote: > Sean Davis wrote: >> What are the alternatives for accessing an ODBC source from python >> (linux 64-bit, python 2.5)? It looks like mxODBC is the only one >> available? >> > There is, I understand, a pyodbc module as well. Having never used it I > can't say how good it is.

Re: odbc module for python

2007-07-19 Thread Steve Holden
Sean Davis wrote: > What are the alternatives for accessing an ODBC source from python > (linux 64-bit, python 2.5)? It looks like mxODBC is the only one > available? > There is, I understand, a pyodbc module as well. Having never used it I can't say how good it is. regards Steve -- Steve Ho

Re: odbc DbiDate date conversion

2006-09-27 Thread flupke
Frank Millman schreef: > Not that I know of. The results of my investigations so far seem to > indicate that we have a problem :-( > > Here is a link to an article dated 1998 - > https://svn.python.org/www/trunk/pydotorg/windows/OdbcHints.html > > Among other interesting stuff, it states -

Re: odbc DbiDate date conversion

2006-09-27 Thread Frank Millman
flupke wrote: > Frank Millman schreef: > > > > Well waddyaknow - I get exactly the same, for dates earlier than > > 1970-01-02. Thanks for finding a bug that would have bitten me sooner > > or later. > > > > I will do some investigation. If I find an answer I will post it here, > > unless some ki

Re: odbc DbiDate date conversion

2006-09-26 Thread flupke
flupke schreef: When i do the same sql from a client, i get this: 1961-02-15 Seems ok. If i check the catalog, the native field type is listed as 10 positions and of type date. Yet when i print it after i got the values i get this which looks very weird (print "value ",str(i)," type ",type(i)):

Re: odbc DbiDate date conversion

2006-09-26 Thread flupke
Frank Millman schreef: > Well waddyaknow - I get exactly the same, for dates earlier than > 1970-01-02. Thanks for finding a bug that would have bitten me sooner > or later. > > I will do some investigation. If I find an answer I will post it here, > unless some kind soul saves me the trouble an

Re: odbc DbiDate date conversion

2006-09-26 Thread Frank Millman
flupke wrote: > Frank Millman schreef: > > flupke wrote: > >> I'm using a solid DB and i'm accessing it via the odbc module > >> (activepython). > >> I get a DbiDate object returned but i don't find a way to decently print > >> it or get a format like %d/%m%/%y. > >> > > > > I convert it to a date

Re: odbc DbiDate date conversion

2006-09-26 Thread flupke
Frank Millman schreef: > flupke wrote: >> I'm using a solid DB and i'm accessing it via the odbc module >> (activepython). >> I get a DbiDate object returned but i don't find a way to decently print >> it or get a format like %d/%m%/%y. >> > > I convert it to a datetime() instance, like this - >

Re: odbc DbiDate date conversion

2006-09-26 Thread Frank Millman
flupke wrote: > I'm using a solid DB and i'm accessing it via the odbc module > (activepython). > I get a DbiDate object returned but i don't find a way to decently print > it or get a format like %d/%m%/%y. > I convert it to a datetime() instance, like this - mydate = datetime.datetime.from

Re: ODBC module and strange date reference <...>

2006-03-08 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > I'm all for using for the latest version of Python. I'm just now > learning about Python classes, and it seems like there were some > significant changes at 2.2. I don't remember exactly what appeared when, but nothing you learn with 2.1 will stop working in 2.2 (I think

Re: ODBC module and strange date reference <...>

2006-03-08 Thread Andrew MacIntyre
[EMAIL PROTECTED] wrote: >> If I were you, I'd check with ESRI support if you can't >> use a newer version of Python. I think it's possible. > > I think it is as well and am looking into it. It's possible if they choose to build the necessary binary modules (DLLs). On Windows, Python extension m

Re: ODBC module and strange date reference <...>

2006-03-07 Thread dananrg
Magnus Lycka wrote: > Are you using an old version of ESRI software, or are > they shipping a product with an ancient version of Python? We're using the latest and greatest ArcGIS Desktop product, which is at release 9.1. Evidently they chose to use Python 2.1 to ensure a "silent install" when Arc

Re: ODBC module and strange date reference <...>

2006-03-03 Thread Gerhard Häring
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Magnus Lycka wrote: > [EMAIL PROTECTED] wrote: > >>Been using the ODBC module for Python 2.1 > > > It might well become a problem that you are stuck with > a five year old Python version. Python 2.1 is no longer > a supported Python version. Suppor

Re: ODBC module and strange date reference <...>

2006-03-03 Thread Steve Holden
Scott David Daniels wrote: > Magnus Lycka wrote: > >> Concerning mxODBC, you might want to have a second look >>at it. ... a licence might well be worth its price. > > Yup, it _is_ a great deal. I worked with mxODBC in a former > job at DevelopNET, and (A) the license cost was _low_, and (B

Re: ODBC module and strange date reference <...>

2006-03-03 Thread Scott David Daniels
Magnus Lycka wrote: > Concerning mxODBC, you might want to have a second look > at it. ... a licence might well be worth its price. Yup, it _is_ a great deal. I worked with mxODBC in a former job at DevelopNET, and (A) the license cost was _low_, and (B) it saved me enough time in the first

Re: ODBC module and strange date reference <...>

2006-03-03 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > Been using the ODBC module for Python 2.1 It might well become a problem that you are stuck with a five year old Python version. Python 2.1 is no longer a supported Python version. Support for 2.2 will probably end soon. Are you using an old version of ESRI software, o

Re: ODBC module and strange date reference <...>

2006-03-03 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > Incidentally, I have just ordered: > > * Learning Python > * Python Cookbook > * Python Pocket Reference > > Are there any other books y'all would recommend as essential Python > references and/or books for becoming fluent in Python? Both Beazley's "Python Essential Re

Re: ODBC module and strange date reference <...>

2006-03-02 Thread Frank Millman
Diez B. Roggisch wrote: > [EMAIL PROTECTED] wrote: > > > Sorry for the double-thanks Frank. > > > > I'm using Python 2.1 for Win32 and import datetime fails. > > > > Does the datetime module come standard with later releases of Python? > > If so, which release? If not, will datetime with with Pyth

Re: ODBC module and strange date reference <...>

2006-03-02 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Sorry for the double-thanks Frank. > > I'm using Python 2.1 for Win32 and import datetime fails. > > Does the datetime module come standard with later releases of Python? > If so, which release? If not, will datetime with with Python 2.1, if it > will, where can I get

Re: ODBC module and strange date reference <...>

2006-03-02 Thread dananrg
Sorry for the double-thanks Frank. I'm using Python 2.1 for Win32 and import datetime fails. Does the datetime module come standard with later releases of Python? If so, which release? If not, will datetime with with Python 2.1, if it will, where can I get it? I'm still such a newbie with Python

Re: ODBC module and strange date reference <...>

2006-03-02 Thread dananrg
Thanks Frank. Much appreciated. I will give it a go. -- http://mail.python.org/mailman/listinfo/python-list

Re: ODBC module and strange date reference <...>

2006-03-02 Thread dananrg
Thanks Frank. Much appreciated. I will give it a go. -- http://mail.python.org/mailman/listinfo/python-list

Re: ODBC module and strange date reference <...>

2006-03-02 Thread Frank Millman
[EMAIL PROTECTED] wrote: > Been using the ODBC module for Python 2.1 (Win32) and had another > question. When I return data from date columns, it's in a strange > object form, e.g. (don't have the output in front > of me>. > > What's an easy way to convert date objects into a human-readable > str

Re: ODBC

2006-01-26 Thread Roger Upole
>From the syntax, this appears to be the odbc module included with the Pywin32 package. http://sourceforge.net/projects/pywin32/ You probably have it installed with the 2.1.1 version, but not 2.4. hth Roger <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I would like to

Re: ODBC Insert question

2006-01-19 Thread Bill Witherspoon
Hi Steve,You were absolutely correct! Sorry for the slow reply, but I was off for a couple of days and had shelved the problem. Saw your reply today and tried it. I then re-read the mxODBC docs and saw the section that I should have read a little better. Thanks again.Bill.On 1/12/06, Steve Holden <

Re: ODBC Insert question

2006-01-12 Thread Steve Holden
Bill Witherspoon wrote: > Hi all, > > Am trying to teach myself a bit of Python by creating a small app to > track tasks, and docs associated with the task. I'm using Python 2.4 on > Win32 with an Access 2003 db which I'm attempting to talk to using > mxODBC. I can do Selects without difficulty

Re: odbc errors

2005-10-16 Thread Roger Upole
[EMAIL PROTECTED] wrote: > hi > > i have a piece of code: > ... > > def connectdb(sql): >import dbi >import odbc >import sys >try: >s = odbc.odbc('DSN=CONN;UID=user;PWD=pass') >cur = s.cursor() > # cur.execute("set nocount on") >cur.execute(sql) >

Re: odbc and python

2005-06-06 Thread Michele Petrazzo
Giles Brown wrote: > MM wrote: > >>Are there any other odbc packages other than the win32all and mxodbc >>ones? The win32all odbc.pyd can't access table structure info like >>SQLColumns, and mxobdc requires a commercial license which is >>unjustifiable for this tiny project. Any other OS alternati

Re: odbc and python

2005-06-03 Thread Scott David Daniels
MM wrote: > Are there any other odbc packages other than the win32all and mxodbc > ones? The win32all odbc.pyd can't access table structure info like > SQLColumns, and mxobdc requires a commercial license which is > unjustifiable for this tiny project. Any other OS alternatives for > win32?. Th

Re: odbc and python

2005-06-03 Thread Thomas Heller
Giles Brown schrieb: > MM wrote: > >>Are there any other odbc packages other than the win32all and mxodbc >>ones? The win32all odbc.pyd can't access table structure info like >>SQLColumns, and mxobdc requires a commercial license which is >>unjustifiable for this tiny project. Any other OS alterna

Re: odbc and python

2005-06-03 Thread Giles Brown
MM wrote: > Are there any other odbc packages other than the win32all and mxodbc > ones? The win32all odbc.pyd can't access table structure info like > SQLColumns, and mxobdc requires a commercial license which is > unjustifiable for this tiny project. Any other OS alternatives for > win32?. Thanks

Re: odbc and python

2005-06-02 Thread John Machin
MM wrote: > Are there any other odbc packages other than the win32all and mxodbc > ones? The win32all odbc.pyd can't access table structure info like > SQLColumns, and mxobdc requires a commercial license which is > unjustifiable for this tiny project. Presumably you really mean 'are there any

Re: ODBC Connection on Windows XP

2005-01-04 Thread Andrew MacIntyre
On Mon, 3 Jan 2005, Greg Lindstrom wrote: > I am running Python 2.3 on Windows XP and am trying to connect to an > ODBC datasource. I have done this many times on this same box but this > time I get an error message saying > > dbi.operation-error: [WSOCK32.DLL]Connection refused, is the host > li

Re: odbc script

2004-12-24 Thread Benji York
Michele Petrazzo wrote: Of course, if you want to help me to make it db-api 2 compatible, you are welcome! Unfortunately I don't have much time to volunteer, but when you embark on the road to DB API 2.0 compliance I have a fairly extensive test suite you can have. -- Benji York -- http://mail.py

Re: odbc script

2004-12-24 Thread Michele Petrazzo
Steve Holden wrote: you might want to look at www.egenix.com and think about installing the mxODBC module, which I have used with very good results. regards Steve If you want, I have created realpyodbc, that is a class for create an interface between python and odbc with ctypes's help . For now

Re: odbc for solid

2004-12-24 Thread Michele Petrazzo
flupke wrote: Hi, at work we use a solid database and i need to develop an application that accesses it. Problem is the drivers: i only have some dll's lying around and jar. On winsdows i could get by by using ODBC and the dll's to access the solid database but i want to eventually run it on a l

Re: odbc script

2004-12-23 Thread Benji York
Steve Holden wrote: you might want to look at www.egenix.com and think about installing the mxODBC module, which I have used with very good results. I'd also recommend checking out the imaginatively named adodbapi (http://adodbapi.sourceforge.net/) which allows you to use any ODBC driver through

Re: odbc for solid

2004-12-23 Thread Benji York
flupke wrote: On winsdows i could get by by using ODBC and the dll's to access the solid database but i want to eventually run it on a linux server. ODBTP (http://odbtp.sourceforge.net/) allows you to hit Windows ODBC drivers over the network from any machine with a C compiler. If it sounds lik

Re: odbc for solid

2004-12-23 Thread flupke
> Steve Holden wrote: This might be of interest (and also possibly of relevance to an earlier query about accessing MS SQL Server from Unix in the "Python, unix and mssql" thread): http://sourceforge.net/projects/pyodb """PyODB is an ODBC Python module to provide an quick an easy way to work

Re: odbc for solid

2004-12-23 Thread Steve Holden
flupke wrote: Hi, at work we use a solid database and i need to develop an application that accesses it. Problem is the drivers: i only have some dll's lying around and jar. On winsdows i could get by by using ODBC and the dll's to access the solid database but i want to eventually run it on a l

Re: odbc script

2004-12-21 Thread Peter Hansen
Steve Holden wrote: Please note that the odbc module is a bit long in the totth now, though it surely is convenient to get it with win32all. If this work is being done for personal use you might want to look at www.egenix.com and think about installing the mxODBC module, which I have used with v

Re: odbc script

2004-12-21 Thread Steve Holden
Chris wrote: Thanks Benji, I took your advice and added in the conn.commit() into the script but still had the same problem. I did some digging around the odbc documentation and found this bug:

Re: odbc script

2004-12-20 Thread Chris
Thanks Benji, I took your advice and added in the conn.commit() into the script but still had the same problem. I did some digging around the odbc documentation and found this bug: *

Re: odbc script

2004-12-19 Thread Benji York
Chris wrote: what ever is the last loop through doesn't seem to update the database? Try a conn.commit() after your loop. -- Benji York -- http://mail.python.org/mailman/listinfo/python-list