CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Microsoft JET Database Engine (0x80040E10) Parameter ?_2 has no default value.

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    57
  • Date Created
    Wednesday, November 24, 2010
  • This Article Has been Viewed
    5180 times
  • Short Desc
    When using Parameters, you may mistakenly add in a Column that is not used or required.
  • Details
    When you build your Parameters, you add in a Column that is not needed or used, and this will cause this error.

     
    Microsoft JET Database Engine (0x80040E10)
    Parameter ?_2 has no default value.
    /act/Results.asp, line 239
  • Recreate Issue
    To recreate this issue.


    <%
    searchsql.commandtext="Select TalType, TalOne, TalTwo from TableOne where TalOne=?"
    searchsql.Parameters.Append searchsql.CreateParameter("@ProfessionServiceID", adInteger, adParamInput, , TalOne)
    searchsql.Parameters.Append searchsql.CreateParameter("@ProfessionServiceID", adInteger, adParamInput, , TalType)
    %>
  • Resolve Issue
    To resolve this issue, remove the Parameter and Statement value(s) that are not needed or used in the actual Query.

    <%
    searchsql.commandtext="Select TalType, TalOne, TalTwo from TableOne where TalOne=?"
    searchsql.Parameters.Append searchsql.CreateParameter("@ProfessionServiceID", adInteger, adParamInput, , TalOne)
    %>