Re: [Zope] zope sql_delimiter windows

2006-12-27 Thread garry saddington
On Sun, 2006-12-24 at 21:00 +0100, Dieter Maurer wrote:
> garry saddington wrote at 2006-12-23 22:26 +:
> >I have a Zope application that runs perfectly on Linux. However, my
> >target audience is likely to use Windows so I am trying to port my app.
> >to that platform.
> >Whenever I use a multiple insert Zsql method that includes
> >sql_delimiter, python.exe crashes.
> 
> There is no issue with "sql_delimiter" on Windows.
> 
You are correct, after some pointers from the list, I chased down the
problem to the psycopg2 adapter. After downgrading to the last stable
version in the 1 series the problem has gone away.
Thanks to all who offered help.
Regards
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread Jaroslav Lukesh

ANd SQL database is the same type and version or not?

- Original Message - 
From: "garry saddington" <[EMAIL PROTECTED]>




On Sat, 2006-12-23 at 23:39 +0100, Jaroslav Lukesh wrote:

Does run your multiple INSERT queries at Database Adapter Test tab?


None of them run (and I have many) from the test tab as I collect 


the data from a web form using the :records structure.
Regards
Garry


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread Marco Bizzarri

I suspect it could have something to do with psycopg2. I remember
while I was checking my application (which runs using psycopg1) that I
could get a repeated segmentation fault while I run a test which used
sql_delimiter.

You could try to check on the psycopg2 ml.

Regards
Marco

On 12/24/06, garry saddington <[EMAIL PROTECTED]> wrote:

On Sun, 2006-12-24 at 16:10 +0100, Andreas Jung wrote:
> -BEGIN PGP SIGNED MESSAGE-
OK, sorry for the lack of info. What happens is that Zope stops
responding when I fire off a ZSQL method containing a 'sql_delimiter'
and then I get the standard Windows message:
python.exe has encountered a problem and needs to closeetc.
All I can say is that it has something to do with msvcr71.dll which is
in the detail of the above error message. There is no other hint in any
logs as to what is happening and when I close the above dialogue, Zope
comes back to life and the offending ZSQL has not run.
Only ZSQL methods which rely on sql_delimiter are affected. I have
repeated the error on XP pro sp2 and XP home SP2 with Zope versions
2.8,.2.9 and 2.10 using the Pythons that ship with these versions (ie
standard Windows installs). DA is psycopg2 and database is Postgresql.
Any Ideas, can I provide any further information?
Regards
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )




--
Marco Bizzarri
http://iliveinpisa.blogspot.com/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread Dieter Maurer
garry saddington wrote at 2006-12-23 22:26 +:
>I have a Zope application that runs perfectly on Linux. However, my
>target audience is likely to use Windows so I am trying to port my app.
>to that platform.
>Whenever I use a multiple insert Zsql method that includes
>sql_delimiter, python.exe crashes.

There is no issue with "sql_delimiter" on Windows.

In fact, "sql_delimiter" is extremely harmless: it just inserts a delimiter
(usually the "\0" character) used to break the complete generated SQL 
into a sequence of SQL commands sent to the database. This happens
in "...db.DB.query". It is completely platform independent.

>eg.
>
>

You Windows database client library may not like empty SQL commands (while
the Linux library might be more resilient).

Try to suppress the first "sql_delimiter" (as it creates an empty SQL command).



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread Maciej Wisniowski
> Only ZSQL methods which rely on sql_delimiter are affected. I have
> repeated the error on XP pro sp2 and XP home SP2 with Zope versions
> 2.8,.2.9 and 2.10 using the Pythons that ship with these versions (ie
> standard Windows installs). DA is psycopg2 and database is Postgresql.
> Any Ideas, can I provide any further information?
Try to execute failing statement directly from python code (without
Zope). You should find examples on psycopg pages/docs etc.

Looks for me that this may be a psycopg problem that is not connected
with Zope.

-- 
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread garry saddington
On Sun, 2006-12-24 at 16:10 +0100, Andreas Jung wrote:
> -BEGIN PGP SIGNED MESSAGE-
OK, sorry for the lack of info. What happens is that Zope stops
responding when I fire off a ZSQL method containing a 'sql_delimiter'
and then I get the standard Windows message:
python.exe has encountered a problem and needs to closeetc.
All I can say is that it has something to do with msvcr71.dll which is
in the detail of the above error message. There is no other hint in any
logs as to what is happening and when I close the above dialogue, Zope
comes back to life and the offending ZSQL has not run.
Only ZSQL methods which rely on sql_delimiter are affected. I have
repeated the error on XP pro sp2 and XP home SP2 with Zope versions
2.8,.2.9 and 2.10 using the Pythons that ship with these versions (ie
standard Windows installs). DA is psycopg2 and database is Postgresql.
Any Ideas, can I provide any further information?
Regards
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 24. Dezember 2006 11:55:41 + garry saddington 
<[EMAIL PROTECTED]> wrote:

>
>
> Andreas Jung
>  wrote:
>> Please read this:
>>
>> > e-postings-or-how-to-use-a-mailinglist/view>
>
> If there had been anything else to send I would have. I thought the
> question was quite clear: Is there an issue with sql_delimiter on
> windows?

When you mention a "crash" without given an explanation what "crash" means 
then it is legitimate to ask for a detailed explanation. A "crash" can mean 
all and nothing. You must be specific.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFjphkCJIWIbr9KYwRAnRuAJ0e3q0m06dkdNO48T8xM11ENvrp/ACePpMg
gD1luXkHkYVuOQQyoEtaoIc=
=QsF9
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread garry saddington


Andreas Jung
 wrote:
> Please read this:
> 
> 

If there had been anything else to send I would have. I thought the
question was quite clear: Is there an issue with sql_delimiter on
windows?
There is nothing in the error log.
There is nothing in the Event log.
There is nothing in the Z2 log.
Windows event log just says that Python.exe exited abnormally.

I was quite clear on which versions of Zope had been tested. I gave the
code which caused the crash. I have searched Google and I have searched
the mailing list. My last resort is always to ask on this list simply
because of the sort of answer you have just given.
Regards
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-24 Thread garry saddington
On Sat, 2006-12-23 at 23:39 +0100, Jaroslav Lukesh wrote:
> Does run your multiple INSERT queries at Database Adapter Test tab?

None of them run (and I have many) from the test tab as I collect 

the data from a web form using the :records structure.
Regards
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope sql_delimiter windows

2006-12-23 Thread Jaroslav Lukesh

Does run your multiple INSERT queries at Database Adapter Test tab?

JL.

- Original Message - 
From: "garry saddington" <[EMAIL PROTECTED]>




I have a Zope application that runs perfectly on Linux. However, my
target audience is likely to use Windows so I am trying to port my app.
to that platform.
Whenever I use a multiple insert Zsql method that includes
sql_delimiter, python.exe crashes.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zope sql_delimiter windows

2006-12-23 Thread garry saddington
I have a Zope application that runs perfectly on Linux. However, my
target audience is likely to use Windows so I am trying to port my app.
to that platform.
Whenever I use a multiple insert Zsql method that includes
sql_delimiter, python.exe crashes.

eg.



insert into attendance (absent,timeperiod,studentid )
values
(
,
,

)



The above ZSQL method works on Linux any Zope version but causes the
crash on Windows, Zope versions - 2.8, 2.9, 2.10 have been tested and
all fail, is there an issue with this?
Regards
Garry


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )