[Zope] ZSQL Method problem

McDonnell, Larry lmcdonnell@protonenergy.com
Tue, 16 Jul 2002 10:39:16 -0400


Sorry, I solved the problem, the db had empty fields (nulls) and it does
like that. Once I put in something I could see it. Thanks.

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
McDonnell, Larry
Sent: Tuesday, July 16, 2002 10:28 AM
To: 'Zope@Zope. Org' (E-mail)
Subject: [Zope] ZSQL Method problem


I have come across a strange problem in ZSQL Method.  I am using OBDC
adapter to MS Access. Below is real information.


select * from part_number
where (part_num like <dtml-sqlvar part_num type="string">) and
      (title_description like <dtml-sqlvar title_description type="string">)
      (category_type like <dtml-sqlvar category_type type="string">);
To test this query, I input the following:

Part_num 66%
title_description %
category_type %

My results:
There was no data matching this Type Part Number Search query. 
select * from part_number where (part_num like '66%') and (title_description
like '%') and (category_type like '%'); 
If I remove the variable category_type I will see records displayed with a
part_num starting with "66". If I add it back I get no results.

All the variables has information stored in the db. I have used other ZSQL
methods with as many 4 parameters and they work. I thought maybe there were
some reserved words and changed it to document_type but the same results.
Any clues? 

Larry McDonnell

Proton Energy Systems
50 Inwood Rd.
Rocky Hill, CT 06067
(860) 571-6533 ext. 531

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