Re: Can't insert a null value

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Marc (mPAMpaisl_at_optusnet.com.au)
Date: 10/18/04


Date: Mon, 18 Oct 2004 11:30:53 +1000


<snip>
Hi
Not sure if this is a typo, but the null
"Laurel" <FakeMail@Hotmail.com> wrote in message
news:OecSsGKtEHA.3412@TK2MSFTNGP14.phx.gbl...
> Even though the table tblScores allows nulls in Contract, and has a lot of
> rows with null, when li_contract, below is set to Null, the SQL is
> invalid.
> The error message shows the SQL looks like this.
>
> Insert into
> tblScores(Student_ID,Score_Date,Period_Code,Safety,On_Task,Respect,Language,
> Transition,Homework,Contract) VALUES (64,
> #10/26/2004#,'L',5,5,5,5,5,Null,5)

here refers to homework not contract - can homework have null
Marc
>
> And this is the error message
> Invalid use of Null
>
> Dim li_contract as integer
>
> If ls_temp = Null Or ls_temp = "" Then
> li_contract = Null
> Else
> li_contract = ai_value
> End If
>
> ls_sql = "Insert into tblScores(Student_ID,Score_Date,Period_Code" _
> &
> ",Safety,On_Task,Respect,Language,Transition,Homework,Contract) " _
> & " VALUES (" & !Student_ID _
> & ", #" & adt_date & "#," _
> & "'" & lrst_Periods!Period_Code & "'," _
> & ai_value & "," _
> & ai_value & "," _
> & ai_value & "," _
> & ai_value & "," _
> & ai_value & "," _
> & ls_homework & "," _
> & li_contract & ")"
>
>



Relevant Pages

  • Re: Cant insert a null value
    ... > Even though the table tblScores allows nulls in Contract, ... > rows with null, when li_contract, below is set to Null, the SQL is invalid. ... > The error message shows the SQL looks like this. ...
    (microsoft.public.access.gettingstarted)
  • Cant insert a null value
    ... Even though the table tblScores allows nulls in Contract, ... rows with null, when li_contract, below is set to Null, the SQL is invalid. ... The error message shows the SQL looks like this. ...
    (microsoft.public.access.gettingstarted)
  • Re: first day of kindergarten and homework!
    ... make sure that homework is part of the daily routine. ... I would love to do this, but we all signed a contract saying we will ... SIL teaches at a magnet school and said it was best to try ... three kids in this school. ...
    (misc.kids)
  • Re: Device busy error when trying to Rebuild RPM Database...
    ... where someone said this error message was a bug, ... be at least partially rebuilt. ... This communication is for use by the intended recipient and contains ... this e-mail does not constitute a contract offer, a contract amendment, ...
    (RedHat)
  • Re: first day of kindergarten and homework!
    ... make sure that homework is part of the daily routine. ... I would love to do this, but we all signed a contract saying we will support ... put DS in this school because of the contract, ... three kids in this school. ...
    (misc.kids)