[Zope] Searching method using DTML

2001-01-15 Thread Angietel



dtml-if "_['custname']!=''AND 
_['custid']==''"

 dtml-call 
"sqlSearchcust3"

dtml-elif "_['custid']!=''AND 
_['custname']==''"

 dtml-call 
"sqlSearchcust2" dtml-elif "_['custid']!=''AND 
_['custname']!=''"

 dtml-call 
"sqlSearchcust" dtml-else

 dtml-var 
expr="REQUEST['/Customer/View/searchallcust']"

/dtml-if

The ZOPE error is like :-

Expression (Python) Syntax 
error: invalid syntax
, for tag dtml-if "_['custname']!=''AND 
_['custid']==''", on line 20 of a


[Zope] DTML-dtml-in dtml-call

2001-01-15 Thread Angietel




Is dtml-call REQUEST['sqlSearchcust3'] 
equal to dtml-in sqlSearchcust3


[Zope] More than one condition indtml-if

2001-01-14 Thread Angietel




The following is my DTML code, purposely to valid 
the entry field and return the right sql method according to the 
situation:-

dtml-if "_['dtml-var custname']!=""" 
AND "_['dtml-var custid']==""" 

 dtml-in 
sqlSearchcust3#// if the custid is blank and 
custnameis not blank then will use 
sqlSearch3
 dtml-elif "_['dtml-var 
custid']!=""" AND "_['dtml-var custname']=="""

 dtml-in 
sqlSearchcust2
#// if the custid is not blank and 
custname is blank then will use sqlSearch2

dtml-elif "_['dtml-var custid']==""" 
AND "_['dtml-var 
custname']==""" 
 
 dtml-in 
sqlSearchcust#// if the 
custname is not blank and custid is not blank then will use 
sqlSearch
dtml-else

 dtml-var 
expr="REQUEST['/Customer/View/searchallcust']" 
#// if the 
custname isblank and custid isblank then willgo to view a list 
of customer record.
/dtml-if

The following is the ZOPE error:-
Unexpected tag, for tag dtml-elif 
"_['dtml-var custid']==""" AND "_['dtml-var custname']!=""", 
on line 9 of a


For my sql method syntax are as 
follow:-

1.sqlSearchcust3

 select *from 
customerdtml-sqlgroup where dtml-sqltest custid 
op=ne type=stringdtml-anddtml-sqltest custname 
op=like'%%' type=string/dtml-sqlgroup

2. sqlSearchcust2

select *from customerdtml-sqlgroup 
where dtml-sqltest custid op=eq 
type=stringdtml-anddtml-sqltest custname op=ne 
type=string/dtml-sqlgroup
3. sqlSearchcust

select *from customerdtml-sqlgroup 
where dtml-sqltest custid op=eq 
type=stringdtml-anddtml-sqltest custname 
op=like'%%' type=string/dtml-sqlgroup

This is urgent! Please give me some solution, 
Thanks!


[Zope] Searching method due to situation

2001-01-14 Thread Angietel





The following is my DTML code, purposely to valid 
the entry field and return the right sql Searching method according to the 
situation:-

dtml-if "_['dtml-var custname']!=""" 
AND "_['dtml-var custid']==""" 

 dtml-in 
sqlSearchcust3#// if the custid is blank and 
custnameis not blank then will use 
sqlSearch3
 dtml-elif "_['dtml-var 
custid']!=""" AND "_['dtml-var custname']=="""

 dtml-in 
sqlSearchcust2
#// if the custid is not blank and 
custname is blank then will use sqlSearch2

dtml-elif "_['dtml-var custid']==""" 
AND "_['dtml-var 
custname']==""" 
 
 dtml-in 
sqlSearchcust#// if the 
custname is not blank and custid is not blank then will use 
sqlSearch
dtml-else

 dtml-var 
expr="REQUEST['/Customer/View/searchallcust']" 
#// if the 
custname isblank and custid isblank then willgo to view a list 
of customer record.
/dtml-if

The following is the ZOPE error:-
Unexpected tag, for tag dtml-elif 
"_['dtml-var custid']==""" AND "_['dtml-var custname']!=""", 
on line 9 of a


For my sql method syntax are as 
follow:-

1.sqlSearchcust3

 select *from 
customerdtml-sqlgroup where dtml-sqltest custid 
op=ne type=stringdtml-anddtml-sqltest custname 
op=like'%%' type=string/dtml-sqlgroup

2. sqlSearchcust2

select *from customerdtml-sqlgroup 
where dtml-sqltest custid op=eq 
type=stringdtml-anddtml-sqltest custname op=ne 
type=string/dtml-sqlgroup
3. sqlSearchcust

select *from customerdtml-sqlgroup 
where dtml-sqltest custid op=eq 
type=stringdtml-anddtml-sqltest custname 
op=like'%%' type=string/dtml-sqlgroup

This is urgent! Please give me some solution, 
Thanks!


[Zope] Problem on searching the record

2001-01-08 Thread Angietel



The following is my sql method, it can return 
result even i only enter one alphabet in custname but it can't work when i enter 
data into the custid.


select *from 
customerwherecustid='dtml-var custid'ORcustname LIKE 
"%dtml-var custname%"


P/s let me know where is my 
error.TQ


[Zope] How to retrieve the selection list

2001-01-08 Thread Angietel



The following is my selection list, where should i 
put the dtml-var custcountry in order to display the selected 
result.

select name="custcountry" size="1" tabindex="9" 
style="HEIGHT: 22px; WIDTH: 
293px" 
option value="."selectedPlease select a 
country/option

option 
value="Australia"Australia/optionoption 
value="Cambodia"Cambodia/optionoption 
value="Canada"Canada/optionoption 
value="China"China/optionoption 
value="Colombia"Colombia/optionoption 
value="Denmark"Denmark/optionoption 
value="France"France/optionoption 
value="Germany"Germany/optionoption 
value="Greece"Greece/optionoption 
value="Greenland"Greenland/optionoption value="Hong Kong 
S.A.R."Hong Kong S.A.R./optionoption 
value="Iceland"Iceland/optionoption 
value="India"India/optionoption 
value="Indonesia"Indonesia/optionoption 
value="Italy"Italy/optionoption 
value="Japan"Japan/optionoption 
value="Korea"Korea/optionoption value="Korea, 
North"Korea, North /optionoption value="Macau 
S.A.R."Macau S.A.R./optionoption 
value="Malaysia"Malaysia/optionoption value="United 
Kingdom"United Kingdom/optionoption value="United 
States"United 
States/option/select
Thank You!


[Zope] Problem on running the ZOPE with ZmySQLDA

2000-12-18 Thread Angietel



The following is the illegal operation msg 
details:-

PYTHON executed an invalid instruction 
in
module unknown at :01560f54.
Registers:
EAX=00b3ceb1 CS=016f EIP=01560f54 
EFLGS=00010286
EBX=0001 SS=0177 ESP=01dbf5dc EBP=01560f50
ECX=1e10f91f DS=0177 ESI= FS=57df
EDX= ES=0177 EDI=011c2a50 GS=
Bytes at CS:EIP:
f0 a2 1c 01 50 14 35 01 44 20 20 20 02 00 00 00 

Stack dump:
00763130 1e16f958 00763130  00763130 1e10f831 
01713570 00763130  01713570 00b4497c 1e10e74c 01713570 00763130  
00b0d970
and this is my ZSQL method:-
1.For search function:-
select *from customerwheredtml-sqltest custid 
type=stringORdtml-sqltest custname type=string
2.For create table customer:-
CREATE TABLE customer(custid VARCHAR(10)NOT 
NULL,custname VARCHAR(15),custregno VARCHAR(10),custactdate 
DATE,custadd1 VARCHAR(30),custadd2 VARCHAR(30),custcity 
VARCHAR(20),custstate VARCHAR(15),custcountry 
VARCHAR(30),custpostcode INTEGER,custtel INTEGER,custfax 
INTEGER,custemail VARCHAR(30),custurl VARCHAR(30),custremarks 
VARCHAR(30),shippingadd1 VARCHAR(30),shippingadd2 
VARCHAR(30),shippingcity VARCHAR(20),shippingstate 
VARCHAR(15),shippingcountry VARCHAR(30),shippingpostcode 
INTEGER,shippingtel INTEGER,shippingfax INTEGER,shippingemail 
VARCHAR(30),custstatus VARCHAR(10),custcontname 
VARCHAR(15),custcontdesg VARCHAR(20),custconttel INTEGER,custcontext 
INTEGER,custconteml VARCHAR(30),custcontmob INTEGER,custcontfax 
INTEGER,custcredlimit FLOAT,custcredterm INTEGER,custinterest 
FLOAT,custopbal FLOAT,custbaldue FLOAT,custsales 
VARCHAR(15),custpricelev INTEGER, PRIMARY KEY(custid))
3.For view all records:-
select *from customer order by custname
So far, i tried to install python1.6 and 1.5.2 but there no 
changes at all. and i also reinstall my ZOPE because you said my ZOPE is died. 
Please tell me what should i do?Because i have spend a long time in this 
problem.


[Zope] *Problem on running the ZOPE by using ZmySQLDA

2000-12-13 Thread Angietel



Files\WebSite\z2.py" 
-D--2000-12-13T08:34:28 PROBLEM(100) ZServer Computing default 
hostname--2000-12-13T08:34:31 INFO(0) ZServer Medusa (V1.16.4.2) 
started at Wed Dec 1316:34:31 
2000 Hostname: 
ANGIE 
Port:8080--2000-12-13T08:34:31 INFO(0) ZServer FTP server 
started at Wed Dec 1316:34:31 
2000 
Authorizer:None Hostname: 
angie Port: 
8021--2000-12-13T08:34:31 INFO(0) ZServer PCGI Server started at Wed 
Dec 1316:34:31 2000 Inet 
socket port: 8090--

2000-12-13T08:34:31 INFO(0) ZServer Monitor Server 
(V1.8) started on port8099C:\Program 
Files\WebSite


The word that i have been highlighted is the error 
msg that i want to mentioned. In the SQL statement it does'nt show any error 
msg. And what you have been suggested to me:-

*//making a ZSQL Method that issues a really simple 
query, like:SELECT * FROM InsertYourTableNameHeretry this 
simple test from your "Z MySQL Database Connection"object. Just browse 
to that object in the Zope management interface, clickthe "Test" tab and 
then enter the SQL statement. Then click the "SubmitQuery" button to 
test it.

When i clicked the "Submit Query" button the 
illegal operation error msg will come out.

In MySQL is no sense of the error msg.
This is a bit tricky problem that i 
dontunderstand.


TQ 


[Zope] Problem on connect to MySQL

2000-12-11 Thread Angietel



When i type in the Connection String , it will 
prompt out the error message - "illegal operation" and in my python it will 
exactly like this:-

Files\WebSite\z2.py" 
-D--2000-12-12T03:15:10 PROBLEM(100) ZServer Computing default 
hostname--2000-12-12T03:15:11 INFO(0) ZServer Medusa (V1.16.4.2) 
started at Tue Dec 12 11:15:11 
2000 Hostname: 
ANGIE Port:8080

--2000-12-12T03:15:11 INFO(0) ZServer FTP 
server started at Tue Dec 12 11:15:11 
2000 
Authorizer:None Hostname: 
angie Port: 
8021--2000-12-12T03:15:11 INFO(0) ZServer PCGI Server started at Tue 
Dec 12 11:15:11 2000 Inet 
socket port: 8090--2000-12-12T03:15:11 INFO(0) ZServer Monitor 
Server (V1.8) started on port 8099

C:\Program Files\WebSite #// 
Thisis error msg 

and i would like to confirm to u whether the 
Connection String is write like this:-
customerDb[@localhost]Password 
pass52696


In mySQL i set up the user password like 
this:-
INSERT INTO user
VALUES('localhost','password',PASSWORD=Password('pass52696'),'Y','Y','Y',Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
and my Database name is CustomerDb

P/s let me know where is my mistake! Thank 
You!


[Zope] Can't load confirm message box

2000-12-03 Thread Angietel





body class="body" 

script language="JavaScript"
function confirm(){window.confirm("Are you sure 
you want to delete?");}/script


[Zope] validation-onClick

2000-11-23 Thread Angietel



The form="a" and its input field="custid" is being 
validated,when the alert message box came outtheni clicked on 
the 'OK' button which is inside the alert message box, but it return to another 
page insteadreturn to form="a".
( Ipreferto use 'onClick' 
insteadof 'onSubmit' )

The following is my JavaScript validation 
function:-

function 
checkid(){if(document.a.custid.value==""document.a.custname.value==""){alert("You 
must specify string character either in customer id or customer 
name.")document.a.custid.focus();return 
false;}}


The form events:-

input type="SUBMIT" name="Search" 
value="Search"  



[Zope] date in Z Gadfly Database

2000-11-22 Thread Angietel



When i create a table, one of the fields is 
consider as date type, but the Z Gadfly Database does not allow me to do that, 
it only accepts INTEGER instead of DATE type.

The following is my SQL for creating a 
table:-

CREATE TABLE customer(custid 
VARCHAR(10),custname VARCHAR(15),custactdate DATE,custadd1 
VARCHAR(30),custadd2 VARCHAR(30))

Please let me know if i got an error.Thank 
You.