Menu

#7 Docs: Errors, possible causes

open
nobody
None
5
2004-04-29
2004-04-29
Ted Husted
No

CpuBridge.Test.Services.QueryTest.PermitByApplicant :
System.IndexOutOfRangeException : COLUMN_NAME

Possible cause: A property was specified in a ResultMap
that did not exist in the query.

Check that the column spelling consistent with the
stratement. Cut and pasting the names from the
statement to the ResultMap can help. Make sure there
are no extra spaces in the XML attribute setting.

----

CpuBridge.Test.Services.QueryTest.PermitByApplicant :
System.ArgumentException : Could not set value of type
'System.String' in property 'Property' of type 'ClassName'

Possibile cause: One of the other property names may be
misspelled. The confusing bit is that it is usually not
the one specified here :-/

----

Discussion

  • Ted Husted

    Ted Husted - 2004-04-30

    Logged In: YES
    user_id=3618

    No value given for one or more required parameters.

    Possible cause: If all the expected parameters are given,
    then a column name may be misspelled in the query (making it
    seem like a parameter).

     
  • Ted Husted

    Ted Husted - 2004-05-06

    Logged In: YES
    user_id=3618

    "This SQL map does not contain an MappedStatement named
    StatementName"

    Possible cause: A "<statements"> element must surround the
    <statement> elements in order for statements to be
    processed.

    ----

     
  • Ted Husted

    Ted Husted - 2004-05-06

    Logged In: YES
    user_id=3618

    "Index (zero based) must be greater than or equal to zero
    and less than the size of the argument list."

    Possible cause: A property name is given in the XML
    statement that is not found on the domain object passed to
    the query. If the inconsistency is not obvious, try rebuilding
    the statement until the problem property is identified.

     
  • Ted Husted

    Ted Husted - 2004-05-07

    Logged In: YES
    user_id=3618

    "Object reference not set to an instance of an object."

    Possible cause: If a control on an ASP.NET page depends on
    another object, for example a validator, the error may be
    reported against the code-behind line that set the control,
    rather than the line of ASP.NET page where the validatoris
    coded.

     
  • Ted Husted

    Ted Husted - 2004-05-07

    Logged In: YES
    user_id=3618

    "Parameter ?_# has no default value."

    Possible cause: The field in the database is not setup to
    accept nulls, but the query is trying to pass a null field. You
    can set a default value for null in a ParameterMap. Then, in
    the class populating the ParameterMap, use the default value
    instead of null.

     
  • Ted Husted

    Ted Husted - 2004-06-10

    Logged In: YES
    user_id=3618

    "System.NullReferenceException : Object reference not set
    to an instance of an object."

    If while processing a query, this error can mean a named
    parameter does not match a column name. Check the spelling
    and any punctuation (like underscores). Unmatched hash-marks
    (#'s) can also cause this error.

     
  • Ted Husted

    Ted Husted - 2004-09-30

    Logged In: YES
    user_id=3618

    CpuPermitting.Model.Helpers.ActionTest.ValidateForInsert :
    System.ArgumentException : Cannot widen from target type to
    primitive type.

    Possible cause: The application type and database data type
    are different sizes. A "byte" size column in the database
    might be represneted by an "int" size property in the
    application. The database might also be returning a "long"
    sized result from a calculation. In this case, you can often
    use a CAST method (or equivalant) to change the result to
    the appropriate type. Another solution is to create a
    utility property for the larger sized result and do the cast
    within the application.

     

Log in to post a comment.

MongoDB Logo MongoDB