[Zope-DB] Null characters & booleans

2005-04-08 Thread Andrew Veitch
We're doing a lot with relational databases and Zope at the moment. We are trying to get our code to work with as many different relational backends as possible with a minimal amount of rewriting. The first issue we've got is chr(0) appearing in input strings. Using Postres/Psycopg if we do:

Re: [Zope-DB] Null characters & booleans

2005-04-08 Thread Charlie Clark
On 2005-04-08 at 10:44:59 [+0200], Andrew Veitch <[EMAIL PROTECTED]> wrote: > We'd be willing to provide patches for both these issues if there's > interest and agreement it's a sensible way to go. The most sensible thing is if the DA does not have to do the quoting at all and that this is eith

[Zope-DB] Creating a hyperlink using results from query

2005-04-08 Thread Martin Jennings
Firstly, thank you to those who answered by query on the empty result set, it set me on the way to finding a solution. Not sure if this is the right list to ask on, but here is the question. I have got information from a ZSQL request in a result set and I want to use one of the values as a parame

Re: [Zope-DB] Creating a hyperlink using results from query

2005-04-08 Thread Charlie Clark
On 2005-04-08 at 11:44:17 [+0200], Martin Jennings <[EMAIL PROTECTED]> wrote: > Firstly, thank you to those who answered by query on the empty result set, > it set me on the way to finding a solution. > > Not sure if this is the right list to ask on, but here is the question. > > I have got inf

Re: [Zope-DB] Null characters & booleans

2005-04-08 Thread Cliff Ford
Watch out if you need to use fields longer than 4000 characters - Oracle CLOBs return handles rather than contents, as in MySQL Text fields for example. So you need extra coding in your presentation later. Also, watch out for Database X returning result.FieldName whilst Database Y returns resul

Re: [Zope-DB] Creating a hyperlink using results from query

2005-04-08 Thread Cliff Ford
Martin Jennings wrote: Firstly, thank you to those who answered by query on the empty result set, it set me on the way to finding a solution. Not sure if this is the right list to ask on, but here is the question. I have got information from a ZSQL request in a result set and I want to use one of t

[Zope-DB] Returning values from Oracle function/procedure with ZSQLMethod

2005-04-08 Thread Maciej Wisniowski
Hi I'm using DCOracle2 to connect to Oracle databases, but I think that moving to SQLRelay may be a good idea. I haven't tried it yet but I wonder how to get any values returned from oracle function and/or procedures using only ZSQLMethods? I've made few tries with DCOracle to call functions from Z

RE: [Zope-DB] Returning values from Oracle function/procedure withZSQLMethod

2005-04-08 Thread Jim Abramson
for functions, you can do something like select my_function_result() from dual (assuming your function returns a scalar of some kind.) for procedures, you can do the DCOracle2 Stored Procedure (might be called ZOracleDA Stored Procedure in your install...) OTOH I've found the procedure objec

Re: [Zope-DB] Returning values from Oracle function/procedure withZSQLMethod

2005-04-08 Thread Cynthia Kiser
Quoting Jim Abramson <[EMAIL PROTECTED]>: > In our experience we ended up needing to do increasingly complex > things with plsql, and ultimately, we had no choice to move all our > db access out into ExternalMethods or Products and use DCOracle2 > directly. This does require constructing your own

[Zope-DB] UnpicklingError in Ape 1.0

2005-04-08 Thread Dinh Trung Viet
Hi all, I had a problem when trying to use Ape 1.0 in Zope 2.7 to store data in MySQL database. I cannot add objects into the mount point portion (default is '/sql'). Here is the trace back I found in log file: 2005-04-06T15:12:01 INFO(0) ZODB conflict error at /sql/manage_addProduct/OFSP/manage_ad