|
 |
asp_databases thread: Microsoft OLE DB Provider for ODBC Drivers error '80040e2f'
Message #1 by "Eric Van Camp" <eric.vancamp@c...> on Tue, 21 Nov 2000 22:52:56 -0000
|
|
hi,
i want to update a table in sql server 6.5 the table has a field actif which
is not allowed to be null...
I want to upload the values of a form into the table...
I check whether the value for actif is yes or no and assign the values -1 or
0 for it..
nevertheless i get this error 80040e2f, including the message that the
column actif in table type may not be null...
what is going on?
SQL = "select * from Type"
response.write sql
rs.open SQL,conn,adLockOptimistic,adOpenDynamic,adCmdText
temp1 = upl.form("qsi")
response.write upl.form("coyID")
response.write temp1
rs.addNew
temp7 = rs("image")
rs("CoyID") = upl.form("CoyId")
rs("Pubid") = upl.form("Pubid")
if trim(temp3) <> "" then
rs("image") = temp3
else
rs("image") = temp7
response.end
if temp1 = "Yes" then
response.write "temp1=yes"&temp1
rs("actif") = -1
response.write "rsactif="& rs("actif")
else
rs("actif") = 0
response.end
end if
end if
rs.Update
rs.Close
set rs = nothing
Message #2 by "Dallas Martin" <dmartin@z...> on Wed, 22 Nov 2000 20:42:04 -0500
|
|
Th error message means that the field expects a value. It cannot be
NULL. The solution is to either insert/update the field with a value or
change the field's properties to allow NULLS.
----- Original Message -----
From: "Eric Van Camp" <eric.vancamp@c...>
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, November 21, 2000 5:52 PM
Subject: [asp_databases] Microsoft OLE DB Provider for ODBC Drivers error
'80040e2f'
> hi,
> i want to update a table in sql server 6.5 the table has a field actif
which
> is not allowed to be null...
> I want to upload the values of a form into the table...
> I check whether the value for actif is yes or no and assign the values -1
or
> 0 for it..
> nevertheless i get this error 80040e2f, including the message that the
> column actif in table type may not be null...
> what is going on?
>
> SQL = "select * from Type"
>
> response.write sql
> rs.open SQL,conn,adLockOptimistic,adOpenDynamic,adCmdText
> temp1 = upl.form("qsi")
> response.write upl.form("coyID")
> response.write temp1
> rs.addNew
> temp7 = rs("image")
> rs("CoyID") = upl.form("CoyId")
> rs("Pubid") = upl.form("Pubid")
> if trim(temp3) <> "" then
> rs("image") = temp3
> else
> rs("image") = temp7
> response.end
>
> if temp1 = "Yes" then
> response.write "temp1=yes"&temp1
> rs("actif") = -1
> response.write "rsactif="& rs("actif")
> else
> rs("actif") = 0
> response.end
> end if
> end if
>
> rs.Update
> rs.Close
> set rs = nothing
>
>
|
|
 |