From jsacksteder at gmail.com Mon Sep 5 01:21:41 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Sun, 4 Sep 2005 19:21:41 -0400 Subject: [DB-SIG] unicode woes. Message-ID: <51c8a7be05090416216206ac21@mail.gmail.com> Access 2000 and it's newer ilk use unicode for memo fields. Python's DBI chokes when reading data out of such fields, producing an error like this- 'Invalid character value for cast specification on column number 7'. I can state with certainty that there should be no non-ascii characters in those fields. Is there a way to alter the unicode 'cast'-ing step to drop unparsable characters? Whereabouts is that handled in DBI? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/db-sig/attachments/20050904/0786fe59/attachment.html From marcos at burke.ath.cx Mon Sep 5 09:51:08 2005 From: marcos at burke.ath.cx (Marcos =?ISO-8859-1?Q?S=E1nchez?= Provencio) Date: Mon, 05 Sep 2005 09:51:08 +0200 Subject: [DB-SIG] unicode woes. In-Reply-To: <51c8a7be05090416216206ac21@mail.gmail.com> References: <51c8a7be05090416216206ac21@mail.gmail.com> Message-ID: <1125906668.8324.1.camel@savin.proteus> You should evaluate migration to http://adodbapi.sourceforge.net/ The ODBC module that comes with Python is totally obsolete. If you plan to use it, you are on your own. El dom, 04-09-2005 a las 19:21 -0400, jeff sacksteder escribi?: > Access 2000 and it's newer ilk use unicode for memo fields. Python's > DBI chokes when reading data out of such fields, producing an error > like this- > 'Invalid character value for cast specification on column number 7'. > > I can state with certainty that there should be no non-ascii > characters in those fields. Is there a way to alter the unicode > 'cast'-ing step to drop unparsable characters? > > Whereabouts is that handled in DBI? > _______________________________________________ > DB-SIG maillist - DB-SIG at python.org > http://mail.python.org/mailman/listinfo/db-sig -- Marcos S?nchez Provencio From mal at egenix.com Mon Sep 5 10:42:04 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon, 05 Sep 2005 10:42:04 +0200 Subject: [DB-SIG] unicode woes. In-Reply-To: <51c8a7be05090416216206ac21@mail.gmail.com> References: <51c8a7be05090416216206ac21@mail.gmail.com> Message-ID: <431C04DC.6010607@egenix.com> jeff sacksteder wrote: > Access 2000 and it's newer ilk use unicode for memo fields. Python's DBI > chokes when reading data out of such fields, producing an error like this- > 'Invalid character value for cast specification on column number 7'. > > I can state with certainty that there should be no non-ascii characters in > those fields. Is there a way to alter the unicode 'cast'-ing step to drop > unparsable characters? > > Whereabouts is that handled in DBI? I'm not sure which DB interface you are talking about, but I can assure you that mxODBC doesn't have those problems: it will happily read and write Unicode to Access. For backwards compatiblity reasons, mxODBC runs in 8-bit only mode if not told otherwise. To have mxODBC connections run in native Unicode mode you have to set them up using the .stringformat attribute: connection = mx.ODBC.Windows.DriverConnect(...) connection.stringformat = mx.ODBC.Windows.NATIVE_UNICODE_STRINGFORMAT # or connection.stringformat = mx.ODBC.Windows.MIXED_STRINGFORMAT For more information, have a look at the data types section and the connection.stringformat documentation: http://www.egenix.com/files/python/mxODBC.html#Datatypes Hope that helps, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From arun.tyagi at teleatlas.com Tue Sep 6 05:42:24 2005 From: arun.tyagi at teleatlas.com (Arun Tyagi) Date: Tue, 06 Sep 2005 09:12:24 +0530 Subject: [DB-SIG] Python query Message-ID: <431D1020.4A4C5E06@teleatlas.com> Hi, i want to know how can we execute MS Access macro through python code. please help.Its very urgent. Regards Arun From csotelop at yahoo.es Tue Sep 6 15:27:28 2005 From: csotelop at yahoo.es (Carlos Eduardo Sotelo Pinto) Date: Tue, 06 Sep 2005 08:27:28 -0500 Subject: [DB-SIG] Python query In-Reply-To: <431D1020.4A4C5E06@teleatlas.com> References: <431D1020.4A4C5E06@teleatlas.com> Message-ID: <431D9940.2020907@yahoo.es> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Arun Tyagi escribi?: > Hi, > i want to know how can we execute MS Access macro through python code. > please help.Its very urgent. maybe you can check pythonwin, for doing it, I don't know if it could help you, but i hope so. and maybe this thread coul be helpful http://mail.python.org/pipermail/python-win32/2003-April/000955.html - -- Atentamente: *------------------------------------* ,= ,-_-. =. |Carlos E. Sotelo Pinto(KrLoS) | ((_/)o o(\_)) |GNU/Linux User Registered # 379182 | `-'(. .)`-' |Tildes omitidas voluntariamente | \_/ *------------------------------------* Bitacora de Vuelo Sociedad Peruana de Computacion Grupo de Usuarios GNU/Linux Arequipa Grupo de Usuarios Debian Arequipa Grupo de Usuarios Debian Peru - ------------------------------------------------------------------------ La actitud del hacker: Los hackers resuelven problemas y construyen cosas, y creen en la libertad y la ayuda voluntaria mutua. Para ser aceptado como hacker, deber?s comportarte como si tuvieras esta actitud en tu interior. Y para comportarte como si tuvieras esta actitud, deber?s creerte de verdad dicha actitud. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQFDHZlAGmKhCAJG4kcRAvnFAJ9pzUzq8OHbY8RnccpWrJ2CX/uGpACfcLRz ki/d9M6wzl4lhtpaL821iKI= =EpBG -----END PGP SIGNATURE----- ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, m?s seguridad http://correo.yahoo.es From marcos at burke.ath.cx Tue Sep 6 15:27:28 2005 From: marcos at burke.ath.cx (Marcos =?ISO-8859-1?Q?S=E1nchez?= Provencio) Date: Tue, 06 Sep 2005 15:27:28 +0200 Subject: [DB-SIG] Python query In-Reply-To: <431D1020.4A4C5E06@teleatlas.com> References: <431D1020.4A4C5E06@teleatlas.com> Message-ID: <1126013249.9138.23.camel@savin.proteus> You must use COM and have access installed: from win32com.client import Dispatch strDbName = 'Put the path to your database here ' objAccess = Dispatch("Access.Application") #objAccess.Visible = False objAccess.OpenCurrentDatabase(strDbName) objDB = objAccess.CurrentDb() macro = objDB.containers("Scripts").Documents['macroName'] etc. Please check vba docs. I have hacked this example from the web and cannot check it from linux. El mar, 06-09-2005 a las 09:12 +0530, Arun Tyagi escribi?: > Hi, > > i want to know how can we execute MS Access macro through python code. > > please help.Its very urgent. > > Regards > Arun > > _______________________________________________ > DB-SIG maillist - DB-SIG at python.org > http://mail.python.org/mailman/listinfo/db-sig -- Marcos S?nchez Provencio From csotelop at yahoo.es Tue Sep 6 15:35:42 2005 From: csotelop at yahoo.es (Carlos Eduardo Sotelo Pinto) Date: Tue, 06 Sep 2005 08:35:42 -0500 Subject: [DB-SIG] unicode woes. In-Reply-To: <51c8a7be05090416216206ac21@mail.gmail.com> References: <51c8a7be05090416216206ac21@mail.gmail.com> Message-ID: <431D9B2E.5090207@yahoo.es> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The modulo adodbapi help with ms datadases, using ado objects http://adodbapi.sourceforge.net/ It is simple and use the DB-API 2.0 jeff sacksteder escribi?: > Access 2000 and it's newer ilk use unicode for memo fields. Python's DBI > chokes when reading data out of such fields, producing an error like this- > 'Invalid character value for cast specification on column number 7'. > > I can state with certainty that there should be no non-ascii characters > in those fields. Is there a way to alter the unicode 'cast'-ing step to > drop unparsable characters? > > Whereabouts is that handled in DBI? > > > ------------------------------------------------------------------------ > > _______________________________________________ > DB-SIG maillist - DB-SIG at python.org > http://mail.python.org/mailman/listinfo/db-sig - -- Atentamente: *------------------------------------* ,= ,-_-. =. |Carlos E. Sotelo Pinto(KrLoS) | ((_/)o o(\_)) |GNU/Linux User Registered # 379182 | `-'(. .)`-' |Tildes omitidas voluntariamente | \_/ *------------------------------------* Bitacora de Vuelo Sociedad Peruana de Computacion Grupo de Usuarios GNU/Linux Arequipa Grupo de Usuarios Debian Arequipa Grupo de Usuarios Debian Peru - ------------------------------------------------------------------------ La actitud del hacker: Los hackers resuelven problemas y construyen cosas, y creen en la libertad y la ayuda voluntaria mutua. Para ser aceptado como hacker, deber?s comportarte como si tuvieras esta actitud en tu interior. Y para comportarte como si tuvieras esta actitud, deber?s creerte de verdad dicha actitud. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQFDHZnlGmKhCAJG4kcRAt73AJ4hPg+NTOcBJjF55PNXd7Cc6wcaSgCff/ii 9jaXbPjKiZ3FMPwx7Sf5+aQ= =cBVC -----END PGP SIGNATURE----- ______________________________________________ Renovamos el Correo Yahoo! 1GB de capacidad, nuevos servicios y m?s seguridad http://correo.yahoo.es From carsten at uniqsys.com Mon Sep 19 15:36:20 2005 From: carsten at uniqsys.com (Carsten Haese) Date: Mon, 19 Sep 2005 09:36:20 -0400 Subject: [DB-SIG] InformixDB-1.5 released Message-ID: <1127136980.25211.31.camel@dot.uniqsys.com> Hi Everybody: I have released a new version, version 1.5, of InformixDB, the DB-API module for connecting to IBM Informix database engines. Download at http://sourceforge.net/projects/informixdb . Notable changes since version 1.4: * Further steps towards DB-API 2 compliance: added recommended keyword arguments to connect() method and implemented cursor methods/attributes .next(), .executemany(), .rowcount, and .arraysize * informixdb.Error now makes details about the error (such as sqlcode) available as attributes. * sqlerrd wasn't initialized properly, and under many circumstances it didn't correspond to the most recent operation. Best regards, Carsten Haese.