Using nulls i a database

Results 1 to 3 of 3

Thread: Using nulls i a database

  1. #1
    Adrian Guest

    Default Using nulls i a database

    I&#039;m trying to insert nulls into a database but get the following error:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Field &#039;products.cartype&#039; cannot be a zero-length string. <BR><BR>/hs/edit.asp, line 18 <BR><BR><BR>The code that i&#039;m trying to use is this:<BR><BR>If LEN(Request.Form("cartype")) &#062; 0 then<BR>cartype = replace(Request.Form("cartype"),"&#039;","&#039;&# 039;")<BR>ELSE <BR>cartype = Null<BR>End If<BR><BR>And this is part of the UPDATE statement:<BR>cartype=&#039;"& cartype &"&#039;<BR><BR>Any help would be great + tell me if you need more information.<BR><BR>Thanks,<BR>Adrian

  2. #2
    Join Date
    Dec 1969

    Default RE: Using nulls i a database

    You need to go into your DB (access, SQL whatever) program and set the field to &#039;allow a null value&#039;.<BR><BR>Thank you come again!

  3. #3
    Adrian Guest

    Default Thank you :-) <eop>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts