Re: Can't insert a null value
From: Marc (mPAMpaisl_at_optusnet.com.au)
Date: 10/18/04
- Next message: Scott: "LinkMaster Property"
- Previous message: Laurel: "Thanks to both"
- In reply to: Laurel: "Can't insert a null value"
- Next in thread: Laurel: "Re: Can't insert a null value"
- Messages sorted by: [ date ] [ thread ]
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 & ")"
>
>
- Next message: Scott: "LinkMaster Property"
- Previous message: Laurel: "Thanks to both"
- In reply to: Laurel: "Can't insert a null value"
- Next in thread: Laurel: "Re: Can't insert a null value"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|