locked
Conversion from type 'DBNull' to type 'String' is not valid. RRS feed

  • Question

  • User2078207646 posted

     Hi  recently added some columns to the ads database, changed the views, the stored prodedures, the BLL/ads file and the various aspx.vb pages and everthing seemed to work fine until.....

    I edit the Ad and update it

    Where on insert any blank textbox is posted to the DB as an empty string on update it is posting it as NULL hence the conversion problem above

    Net result an error message

    Anyone got any thoughts on the subject

     

    Cheers

    Friday, August 7, 2009 6:40 AM

Answers

  • User-1507865547 posted

    If you are using controlparameter at your aspx page then confirm that

    <asp:ControlParameter ConvertEmptyStringToNull="False" />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 7, 2009 7:50 AM

All replies

  • User535082756 posted

    hi

    y dont u just insert the empty string into DB from the textbox directly. If possible can you post some code here.

    thanks,

    Friday, August 7, 2009 7:48 AM
  • User-1507865547 posted

    If you are using controlparameter at your aspx page then confirm that

    <asp:ControlParameter ConvertEmptyStringToNull="False" />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 7, 2009 7:50 AM