|
| Message makes no sense |
 |
Thu, 14 Feb 2008 14:06:19 -050 |
I keep getting an error I don't understand:
An error occurred in:
D:\htdocs\ubquotesonline\public\cgi-bin\coverages_new.exe
Error Code: 163
Error: Data type mismatch. Expecting: Character
Source File: D:\htdocs\ubquotesonline\public\cgi-bin\coverages_new.prg
Routine: coverages_new
Line: 127
Here's line 127
CASE oCGI["PD"]="Y" ;
AND
TRIM(UPPER(qStates1.rowset.fields["quotePD"]))="YES" ;
AND
TRIM(UPPER(qStates1.rowset.fields["PreferredCarrier"].value))="OC
C" ;
AND
ISBLANK(qStates1.rowset.fields["carrieralt1"].value) OR
qStates1.rowset.fields["carrieralt1"].value=null ;
AND TRIM(UPPER(cLeasedon))="NO"
I know that oCGI["PD"] has a value of either "Y" or
"N", quotePD has either
a "YES" or a "NO", PreferredCarrier = "OCC", is
either empty or "AMS" and
cLeaseon is either "YES" or "NO". And I know that there are
valid values in
each field. The oCGI values came in from a webpage and the qStates1 values
came from a table lookup. They are all character values. Can anyone tell me
what else it might mean if I know that all the values are character?
--
Dan Anderson
UBI Processing Dept.
andersond@ubinc.com
800-444-4824 ext 101
--
Dan Anderson
UBI Processing Dept.
andersond@ubinc.com
800-444-4824 ext 101
|
| Post Reply
|
| Re: Message makes no sense |
 |
Thu, 14 Feb 2008 16:52:24 -050 |
Dan Anderson wrote:
>
> Error: Data type mismatch. Expecting: Character
> AND
> TRIM(UPPER(qStates1.rowset.fields["quotePD"]))
|
| Post Reply
|
| Re: Message makes no sense |
 |
Thu, 14 Feb 2008 23:11:06 +010 |
On Thu, 14 Feb 2008 14:06:19 -0500, in dbase.internet,
Subject: Message makes no sense,
Message-ID: <qVeUj8zbIHA.632@news-server>,
"Dan Anderson" <andersond@ubinc.com> wrote:
>CASE oCGI["PD"]="Y" ;
>
> AND
>TRIM(UPPER(qStates1.rowset.fields["quotePD"]))="YES" ;
> AND
>TRIM(UPPER(qStates1.rowset.fields["PreferredCarrier"].value))=&quo
t;OCC" ;
> AND
>ISBLANK(qStates1.rowset.fields["carrieralt1"].value) OR
>qStates1.rowset.fields["carrieralt1"].value=null ;
> AND TRIM(UPPER(cLeasedon))="NO"
>
>I know that oCGI["PD"] has a value of either "Y" or
"N", quotePD has either
>a "YES" or a "NO", PreferredCarrier = "OCC",
is either empty or "AMS" and
>cLeaseon is either "YES" or "NO". And I know that there
are valid values in
>each field. The oCGI values came in from a webpage and the qStates1 values
>came from a table lookup. They are all character values. Can anyone tell me
>what else it might mean if I know that all the values are character?
According to the OLH ISBLANK( ) returns true if a specified expression is blank
or null; false if it
contains data.
True and false are of type boolean, not type character. Could that explain the
error?
Look also at a line like this,
TRIM(UPPER(qStates1.rowset.fields["quotePD"]))="YES"
assume that 'quote PD' has the value "NO", in that case the line may
be written like this,
trim(Upper("NO")) = "Yes", or simpler "NO" =
"YES". The result is false, a non-character
value.
|
| Post Reply
|
| Re: Message makes no sense |
 |
Thu, 14 Feb 2008 23:36:03 -050 |
In article <L8IY9a1bIHA.384@news-server>, user@forget.it says...
> Dan Anderson wrote:
> >
> > Error: Data type mismatch. Expecting: Character
> > AND
> > TRIM(UPPER(qStates1.rowset.fields["quotePD"]))
>
> Upper() wants a character not an object.
>
Michael is right. Just to clarify: you are missing the .value
The only other place you could have a problem is cLeasedon may not
contain character data.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|