Insert record - error '80004005'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blackburnj55
    New Member
    • Apr 2007
    • 5

    Insert record - error '80004005'

    Hi

    I am inserting some records into my access database using asp.net vb script.

    The problem is that "Username" is set to "Not Null" in my database and so i get the following message returned.

    Microsoft JET Database Engine error '80004005'

    The field 'CustomerOrder. Username' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field.

    /james/placeorder.asp, line 135


    However, i have tested it and i am sure that i have a value in the field for "Username". I have done a query to retrieve this.

    Heres the code:

    <input name="Username" type="hidden" id="Username" value="<%=(Reco rdset2.Fields.I tem("Username") .Value)%>">

    So if the value is present, why isnt it going into the table?!

    Any help greatly appreciated.

    thank you
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Whats your insert statement?

    Comment

    • pks00
      Recognized Expert Contributor
      • Oct 2006
      • 280

      #3
      Remove the type hidden so it is viewable on your webpage

      Now when u run it, do u see a value in there?

      Can u double check that , thats the value u are definitely passing in?

      Comment

      Working...