[python-win32] FW: python-win32 image fields problem

Vernon Cole vernondcole at gmail.com
Fri Feb 18 11:04:49 CET 2011


Dardo:

Thanks for the data base you sent me. It allowed me to do a good test of
large binary data, and the scenery in the images is beautiful. I assume they
are images from the Canary Islands.  Also thanks for the VB sample program.
Why does anyone use Visual Basic? Python is so much simpler, as you will see
from the examples I am attaching.

  I am attaching three Python programs, each is a simple example of
inserting, updating, or selecting a .jpg image. The database, image file
names, and the record to update are hard coded in two of them, you can
figure out how you want to specify them.
  The showpix.py program accepts a single command line argument, the record
number (Codigo) of the image you want to see.  It uses your computer's
default image viewer to display the image.

  I've tested them on several versions of Python, 2.6 to 3.1, and they work
as intended.  BUT -- you MUST get a copy of the latest adodbapi from
http://sourceforge.net/projects/adodbapi/ .  There is a bug reading large
binary fields in the older versions.
--
Vernon

On Feb 3, 2011 4:24 AM, "Dardo Schuster Glez" <dardoschuster at hotmail.com>
> wrote:
> >
> >
> >
> >
> > Dear Sir
> >
> > How can y show a jpg that is in a SQL Server image field in a Qlabel
> object ??? and how to change and save it in the image field ???
> >
> > Thanks
> > Dardo Schuster
> > Tenerife - Canary Islands - Spain
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110218/43da6a5e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: showpix.py
Type: application/octet-stream
Size: 1622 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110218/43da6a5e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modifypix.py
Type: application/octet-stream
Size: 1329 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110218/43da6a5e/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: storepix.py
Type: application/octet-stream
Size: 1334 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110218/43da6a5e/attachment-0002.obj>


More information about the python-win32 mailing list