We are experiencing a 500 server error when no option is selected for the payment dropdown field. The db accepts null. The server log file outputs this error:

> 
> 800a005e|Invalid\_use\_of\_Null:\_'CInt' HTTP/1.1
> 
> 
> 

The error log refers to this line:

```
If cint(iPaymentIdRS) = cint(iPaymentId) then selPayment = selPayment & " selected "

```

---

Note: our ASP developer is currently not available, so a simplified answer is appreciated.

* We added the value "no payment option selected" to the empty dropdown field.
* We made sure that the DB accepts null.
* We searched online for a solution but did not find one.

```vb
If sOperation = "Edit" then

    iPaymentId      = Request.Form("cboPayment") :If iPaymentId = "0" then iPaymentId = null

'**********Payment**********************

selPayment = "<option value=""0"">"

Do While rs.EOF = false
    iPaymentIdRS = rs("PaymentId")

    selPayment = selPayment & "<option value=""" & iPaymentIdRS & """"
    If cint(iPaymentIdRS) = cint(iPaymentId) then selPayment = selPayment & " selected "    
    selPayment = selPayment & ">" & rs("PaymentDesc")

    rs.MoveNext
loop

```

I expect that an empty (null) value does not return a 500 error, but is accepted. The payment dropdown field is not mandatory.