Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Frustrations with formView and nullable integers...Frustrations with formView and nullable integers...
Previous
 
Next
New Post
1/20/2009 5:02 PM
 

I have been fighting all day with something I apparently have a fundimental misunderstanding of.

I have a gridview (actually about 50 of then generated by CodeSmith). My database has a lot of tables.

I have my templates generating gridviews to just get the basic maintenance up and running quickly. Every aspx page works exactly the same way, Griview, and Add button that opens the formview. All the formviews with no timestamp fields and no integers works fine. formviews with timestamp fields (bascially a binary that's not input) or a nullible integer give me all sorts of errors. The ObjectDataSource look liks this:

<asp:ObjectDataSource ID="EventDivisionDataSource" runat="server"
    DataObjectTypeName="Crewstone.Modules.Beletseri.EventDivisionInfo"
    DeleteMethod="DeleteEventDivision"
    InsertMethod="AddEventDivision"
    OldValuesParameterformatString="original_{0}"
    SelectMethod="ListEventDivisions"
    TypeName="Crewstone.Modules.Beletseri.BeletseriController"
    UpdateMethod="UpdateEventDivision"
    ConvertNullToDBNull="true">
    <SelectParameters>
        <asp:Parameter DefaultValue="00" Name="PortalId" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

If the formView has an integer that I put nothing into, BOOM. invalid type messaged for Int16, or Int32. The same deal on timestamps. I saw references to putting in parameters:

    <InsertParameters>
        <asp:Parameter Name="EventDateId" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="Priority" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="PortalId" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="Sex" Type="String" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="StartAge" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="EndAge" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="StartWeight" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="EndWeight" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="Survivor" Type="Boolean" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="DivisionId" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="Division" Type="String" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="Depth" Type="Int32" ConvertEmptyStringToNull="true" />
        <asp:Parameter Name="Exclude" Type="Boolean" ConvertEmptyStringToNull="true" />
    </InsertParameters>

and I actually put that into my template before it dawned on me that this may or may not map to the classic **info.vb classes that I have. My info classes are using the IHydratable (mostly, some tables have multiple keys so they use the old method) and a normal DAL (not DAL+).  if I have to regenerate everythign it's no problem since I've been regerenating all the code about every hour all day. Unfortunately I'm not generating the CORRECT code, and need guidance on how to have nullible integers and binary fields (this are read only, but are needed or concurrancy) in a formview.

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Frustrations with formView and nullable integers...Frustrations with formView and nullable integers...


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out