Incompatible data types in expression or assignment. (223)

rajaselvam26

New Member
Hi All,

I am a newbie to Progress..
While doing the user Login Page I got the following Errors.
---------------------------
Error
---------------------------
** Incompatible data types in expression or assignment. (223)
** C:\OpenEdge\WRK\login.w Could not understand line 35. (196)

My Code is as follows:

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type"
CONTENT="text/html; CHARSET=iso-8859-1">
<TITLE>Sales Application</TITLE>

</HEAD>
<BODY>
<H1 ALIGN="center">
<BR>Welcome to <FONT COLOR="#FF0000">Sales Application</FONT><BR>

</H1>
<SCRIPT language="SpeedScript">

IF GET-VALUE("user_name") <> "" THEN
FIND Customer WHERE Name = (GET-VALUE("user_name")) AND CustNum = (GET-VALUE("custNum")) NO-ERROR. -->
IF AVAILABLE(Customer) THEN DO:

</SCRIPT>
<P ALIGN="center">
USER and Customer Number Matches !
</P>
<SCRIPT LANGUAGE="SpeedScript">
END.

</SCRIPT>
<HR WIDTH="70%">
<P ALIGN="center">
<FORM NAME="form1" ACTION="login.html" METHOD="POST">
Login Name:<input name="user_name" SIZE="20" VALUE=`IF AVAILABLE(Customer) THEN STRING(Name)` type = "text" ><BR>
Passowrd: <input name="custNum" SIZE="20" VALUE=`IF AVAILABLE(Customer) THEN STRING(CustNum)` type = "password"><BR>
<INPUT TYPE="SUBMIT" NAME="Button" VALUE="Login">
</FORM>
</P>
<HR WIDTH="70%">
<P ALIGN="center">&nbsp;</P>
</BODY>
</HTML>

Please help me in rectifying this
 

tudorconstantin

New Member
IF GET-VALUE("user_name") <> "" THEN
FIND Customer WHERE Name = (GET-VALUE("user_name")) AND CustNum = (GET-VALUE("custNum")) NO-ERROR. -->
IF AVAILABLE(Customer) THEN DO:

try to change it with:
FIND Customer WHERE Name = (GET-VALUE("user_name")) AND CustNum = integer(GET-VALUE("custNum")) NO-LOCK NO-ERROR.

GET-VALUE() returns character and your CustNum field is (most probably) numerical
 
Top