Error: Out of range value adjusted for column 'EngrAlertForNewQuestions' at row 1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bobby Edward

    #1

    Error: Out of range value adjusted for column 'EngrAlertForNewQuestions' at row 1

    This line of code...

    Using db As New dsUsersTableAda pters.useroptio nsTableAdapter

    Produces this error:

    Out of range value adjusted for column 'EngrAlertForNe wQuestions' at row
    1

    Any idea what this means?

    FYI: The dsUsersTableAda pter is part of the XSD dataset that I
    automatically generated. It's defined as such...

    <TableAdapter BaseClass="Syst em.ComponentMod el.Component"
    DataAccessorMod ifier="AutoLayo ut, AnsiClass, Class, Public"
    DataAccessorNam e="useroptionsT ableAdapter"
    GeneratorDataCo mponentClassNam e="useroptionsT ableAdapter" Name="useroptio ns"
    UserDataCompone ntName="useropt ionsTableAdapte r">
    <MainSource>
    <DbSource ConnectionRef=" MyProjectConnec tionString
    (Web.config)" DbObjectName="M yProject.userop tions" DbObjectType="T able"
    FillMethodModif ier="Public" FillMethodName= "Fill" GenerateMethods ="Both"
    GenerateShortCo mmands="true" GeneratorGetMet hodName="GetDat a"
    GeneratorSource Name="Fill" GetMethodModifi er="Public"
    GetMethodName=" GetData" QueryType="Rows et" ScalarCallRetva l="System.Objec t,
    mscorlib, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
    UseOptimisticCo ncurrency="fals e" UserGetMethodNa me="GetData"
    UserSourceName= "Fill">
    <DeleteComman d>
    <DbCommand CommandType="Te xt" ModifiedByUser= "false">
    <CommandText>DE LETE FROM `MyProject`.`us eroptions` WHERE
    ((`UserOptionId ` = :Original_UserO ptionId))</CommandText>
    <Parameters>
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Int64" Direction="Inpu t"
    ParameterName=" Original_UserOp tionId" Precision="0" ProviderType="B igInt"
    Scale="0" Size="0" SourceColumn="U serOptionId"
    SourceColumnNul lMapping="false " SourceVersion=" Original" />
    </Parameters>
    </DbCommand>
    </DeleteCommand>
    <InsertComman d>
    <DbCommand CommandType="Te xt" ModifiedByUser= "false">
    <CommandText>IN SERT INTO `MyProject`.`us eroptions`
    (`MyProjectUser Id`, `EngrAlertForNe wQuestions`, `BBTagProjectRe sults`,
    `BBNotifyNewMat chingProjects`, `TPNotifyIfChan ge`, `IncludeInMyPro jectDir`,
    `OptOutCommunic ation`) VALUES (:MyProjectUser Id, :EngrAlertForNe wQuestions,
    :BBTagProjectRe sults, :BBNotifyNewMat chingProjects, :TPNotifyIfChan ge,
    :IncludeInMyPro jectDir, :OptOutCommunic ation)</CommandText>
    <Parameters>
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Int64" Direction="Inpu t"
    ParameterName=" MyProjectUserId " Precision="0" ProviderType="B igInt"
    Scale="0" Size="0" SourceColumn="M yProjectUserId"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" EngrAlertForNew Questions" Precision="0"
    ProviderType="T inyInt" Scale="0" Size="0"
    SourceColumn="E ngrAlertForNewQ uestions" SourceColumnNul lMapping="false "
    SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" BBTagProjectRes ults" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="B BTagProjectResu lts"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" BBNotifyNewMatc hingProjects" Precision="0"
    ProviderType="T inyInt" Scale="0" Size="0"
    SourceColumn="B BNotifyNewMatch ingProjects" SourceColumnNul lMapping="false "
    SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" TPNotifyIfChang e" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="T PNotifyIfChange "
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" IncludeInMyProj ectDir" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="I ncludeInMyProje ctDir"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="tr ue" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" OptOutCommunica tion" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="O ptOutCommunicat ion"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    </Parameters>
    </DbCommand>
    </InsertCommand>
    <SelectComman d>
    <DbCommand CommandType="Te xt" ModifiedByUser= "true">
    <CommandText>SE LECT UserOptionId, MyProjectUserId ,
    EngrAlertForNew Questions, BBTagProjectRes ults, BBNotifyNewMatc hingProjects,
    TPNotifyIfChang e, IncludeInMyProj ectDir,
    OptOutCommunica tion
    FROM useroptions</CommandText>
    <Parameters />
    </DbCommand>
    </SelectCommand>
    <UpdateComman d>
    <DbCommand CommandType="Te xt" ModifiedByUser= "false">
    <CommandText>UP DATE `MyProject`.`us eroptions` SET
    `MyProjectUserI d` = :MyProjectUserI d, `EngrAlertForNe wQuestions` =
    :EngrAlertForNe wQuestions, `BBTagProjectRe sults` = :BBTagProjectRe sults,
    `BBNotifyNewMat chingProjects` = :BBNotifyNewMat chingProjects,
    `TPNotifyIfChan ge` = :TPNotifyIfChan ge, `IncludeInMyPro jectDir` =
    :IncludeInMyPro jectDir, `OptOutCommunic ation` = :OptOutCommunic ation WHERE
    ((`UserOptionId ` = :Original_UserO ptionId))</CommandText>
    <Parameters>
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Int64" Direction="Inpu t"
    ParameterName=" MyProjectUserId " Precision="0" ProviderType="B igInt"
    Scale="0" Size="0" SourceColumn="M yProjectUserId"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" EngrAlertForNew Questions" Precision="0"
    ProviderType="T inyInt" Scale="0" Size="0"
    SourceColumn="E ngrAlertForNewQ uestions" SourceColumnNul lMapping="false "
    SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" BBTagProjectRes ults" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="B BTagProjectResu lts"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" BBNotifyNewMatc hingProjects" Precision="0"
    ProviderType="T inyInt" Scale="0" Size="0"
    SourceColumn="B BNotifyNewMatch ingProjects" SourceColumnNul lMapping="false "
    SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" TPNotifyIfChang e" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="T PNotifyIfChange "
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" IncludeInMyProj ectDir" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="I ncludeInMyProje ctDir"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="tr ue" AutogeneratedNa me=""
    DataSourceName= "" DbType="Byte" Direction="Inpu t"
    ParameterName=" OptOutCommunica tion" Precision="0" ProviderType="T inyInt"
    Scale="0" Size="0" SourceColumn="O ptOutCommunicat ion"
    SourceColumnNul lMapping="false " SourceVersion=" Current" />
    <Parameter AllowDbNull="fa lse" AutogeneratedNa me=""
    DataSourceName= "" DbType="Int64" Direction="Inpu t"
    ParameterName=" Original_UserOp tionId" Precision="0" ProviderType="B igInt"
    Scale="0" Size="0" SourceColumn="U serOptionId"
    SourceColumnNul lMapping="false " SourceVersion=" Original" />
    </Parameters>
    </DbCommand>
    </UpdateCommand>
    </DbSource>
    </MainSource>
    <Mappings>
    <Mapping SourceColumn="U serOptionId"
    DataSetColumn=" UserOptionId" />
    <Mapping SourceColumn="M yProjectUserId"
    DataSetColumn=" MyProjectUserId " />
    <Mapping SourceColumn="E ngrAlertForNewQ uestions"
    DataSetColumn=" EngrAlertForNew Questions" />
    <Mapping SourceColumn="B BTagProjectResu lts"
    DataSetColumn=" BBTagProjectRes ults" />
    <Mapping SourceColumn="B BNotifyNewMatch ingProjects"
    DataSetColumn=" BBNotifyNewMatc hingProjects" />
    <Mapping SourceColumn="T PNotifyIfChange "
    DataSetColumn=" TPNotifyIfChang e" />
    <Mapping SourceColumn="I ncludeInMyProje ctDir"
    DataSetColumn=" IncludeInMyProj ectDir" />
    <Mapping SourceColumn="O ptOutCommunicat ion"
    DataSetColumn=" OptOutCommunica tion" />
    </Mappings>
    <Sources />
    </TableAdapter>


  • Bobby Edward

    #2
    Re: Error: Out of range value adjusted for column 'EngrAlertForNe wQuestions' at row 1

    I figured it out. For some STRANGE reason the dataset wizard changed all my
    BOOLEAN fields to BYTES!!!!!

    When I passed "False" to the function it passed "255" for some reason. The
    MySQL db was probably expecting 1 or 0.

    This is crazy!!!!


    Comment

    Working...