|
-
April 9th, 2001, 06:40 AM
#1
Urgent :Store null date into table
I have a field called dte which is a datetime type and allows null.
But I can't insert a null date into it. I found out that dte only stores "1/1/1900", but not null
.........
.........
drp = " " (I also tried drp = null, but it can't work)
sql = "Insert Into Cus_TBL Values " & _
"('" & Trim(txtID.Text) & "','" & _
Yr & "','" & drp & "')"
Please help me !
It's urgent !!!
-
April 9th, 2001, 06:54 AM
#2
Re: Urgent :Store null date into table
Try drp without apostrophies around it
...Yr, drp & ")"
Iouri Boutchkine
[email protected]
-
April 9th, 2001, 09:34 AM
#3
Re: Urgent :Store null date into table
-
April 9th, 2001, 10:05 AM
#4
Re: Urgent :Store null date into table
try this
sql = "Insert Into Cus_TBL Values ('" & Trim(txtID.Text) & "','" & Yr & "',"
if drp = "" then
sql = sql + "NULL"
else
sql = sql + '" & drp & "')"
end if
msgbox sql
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|