Skip to main content
Participant
July 3, 2013
Question

Application_uses_a_value_of_the_wrong_type

  • July 3, 2013
  • 1 reply
  • 536 views

Using CS3 and SQL 2008 - I get this error when attempting to do an insert. POST /red/Research_Entry_form.asp |52|800a0d5d|Application_uses_a_value_of_the_wrong_type_for_the_current_operation.

The field is a dropdown list using values of 1,2,3,4 and so on - if the user does not select a value I get the error. The value in the database is defined as an int. The code is

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param17", 5, 1, -1, MM_IIF(Request.Form("How_Identified_ind"), Request.Form("How_Identified_ind"), null)) ' adDouble

Any help as to why I am getting this and what to do to correct it is greatly appreciated,

This topic has been closed for replies.

1 reply

Participating Frequently
July 4, 2013

>The value in the database is defined as an int.

First of all, make sure the types match. Currently the column is defined as an int. I'm not sure why you are passing it a double? Fix that and see if it helps. Next, does the column allow nulls?