I TRIED TO INSERT NULL INTO DATETIME FILED , ATTHE TIME ERROR MESSAGE IS DATE PARAMETER VALUE NOT SUPPLIED,
THIS CASE RISES WHEN MORE FILEDS IN THE TABLE,INCLUDES DATEFILED
.....
I GIVES QUERY ""INSERT INTO TMPTABLE VALUES(1,266,NULL)"
..........
NOT GOT ERROR WHEN DIRECT EXCUTE ONLY DATE FILED WITH NULL,AT THE TIME IT WILL SUCCESS,,,,
LIKE THIS "INSERT INTO TMPTABLE(BACKDATE) VALUES(NULL)"
Loading
Abdullah MunshiPosted Jan 17, 2012, 12:16 AM
Abdu RafeeqPosted Jan 17, 2012, 12:09 AM
whis is
my query is to pass values to database
Create procedure addvalue
@empname nvarchar(500),
@Date datetime
as begin
insert into emp(name,date)values(@empname,@Date)
end
i got error
Procedure or Function 'addvalue' expects parameter '@Date', which was not supplied.
i think this problem arise due to @datetime is null
How to solve ?
Abdu RafeeqPosted Jan 17, 2012, 12:07 AM
whis is
my query is to pass values to database
Create procedure addvalue
@empname nvarchar(500),
@Date datetime
as begin
insert into emp(name,date)values(@empname,@Date)
end
i got error
Procedure or Function 'addvalue' expects parameter '@Date', which was not supplied.
i think this problem arise due to @datetime is null
How to solve ?
Abdullah MunshiPosted Jan 16, 2012, 11:57 PM
Abdu RafeeqPosted Jan 16, 2012, 11:36 PM
Suthish NairPosted Jan 16, 2012, 8:16 AM
AartiPosted Jan 16, 2012, 3:54 AM
replace this I GIVES QUERY ""INSERT INTO TMPTABLE VALUSE(1,266,NULL)"
with
"INSERT
INTO TMPTABLE VALUES(1,266,NULL)"
Jignesh TrivediPosted Jan 16, 2012, 3:01 AM
how are u insert record in dabase using any code?
have u any variable for assign date time? if yes make it nullble.
DateTime? mydatetime;
kindly share more details on same.
hope this help.