Click here to Skip to main content
15,878,852 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Passing null to datetime datatype Pin
Rahul Gharat16-Dec-08 19:58
Rahul Gharat16-Dec-08 19:58 
GeneralRe: Passing null to datetime datatype Pin
Rahul Gharat16-Dec-08 19:32
Rahul Gharat16-Dec-08 19:32 
AnswerRe: Passing null to datetime datatype Pin
amit sahu2016-Dec-08 19:36
amit sahu2016-Dec-08 19:36 
GeneralRe: Passing null to datetime datatype Pin
Christian Graus16-Dec-08 19:41
protectorChristian Graus16-Dec-08 19:41 
GeneralRe: Passing null to datetime datatype Pin
Rahul Gharat16-Dec-08 20:09
Rahul Gharat16-Dec-08 20:09 
GeneralRe: Passing null to datetime datatype Pin
Christian Graus16-Dec-08 23:06
protectorChristian Graus16-Dec-08 23:06 
GeneralRe: Passing null to datetime datatype Pin
Christian Graus16-Dec-08 19:40
protectorChristian Graus16-Dec-08 19:40 
GeneralRe: Passing null to datetime datatype Pin
Rahul Gharat16-Dec-08 20:07
Rahul Gharat16-Dec-08 20:07 
DateTime? StatusDate,CompletionDate;

if (txtStatusDate.Text != "")
{
StatusDate = obj.ConvertStringToDate(txtStatusDate.Text);
}
else
{
StatusDate = null;
}

i am get error in below code
public Boolean InsertTask(string oprtype, object StatusDate)
{
Database db = DatabaseFactory.CreateDatabase();
string sqlcommand = "DailyReport";
DbCommand dbcommand = db.GetStoredProcCommand(sqlcommand);
db.AddInParameter(dbcommand, "@oprtype", System.Data.DbType.String, oprtype);
if (StatusDate != null)
{
db.AddInParameter(dbcommand, "@StatusDate", System.Data.DbType.DateTime, StatusDate);
}
else
{
db.AddInParameter(dbcommand, "@StatusDate", System.Data.DbType.DateTime, DBNull.Value);
}
db.ExecuteNonQuery(dbcommand);
return true;
}

with regards
rahul
GeneralRe: Passing null to datetime datatype Pin
Christian Graus16-Dec-08 23:04
protectorChristian Graus16-Dec-08 23:04 
QuestionWebsite Deployment Pin
kirandilip16-Dec-08 18:34
kirandilip16-Dec-08 18:34 
AnswerRe: Website Deployment Pin
Christian Graus16-Dec-08 18:48
protectorChristian Graus16-Dec-08 18:48 
AnswerRe: Website Deployment Pin
Abhijit Jana16-Dec-08 18:53
professionalAbhijit Jana16-Dec-08 18:53 
AnswerRe: Website Deployment Pin
Vimalsoft(Pty) Ltd16-Dec-08 19:18
professionalVimalsoft(Pty) Ltd16-Dec-08 19:18 
GeneralRe: Website Deployment Pin
Christian Graus16-Dec-08 19:43
protectorChristian Graus16-Dec-08 19:43 
GeneralRe: Website Deployment Pin
Vimalsoft(Pty) Ltd16-Dec-08 19:47
professionalVimalsoft(Pty) Ltd16-Dec-08 19:47 
AnswerRe: Website Deployment Pin
Brij16-Dec-08 19:34
mentorBrij16-Dec-08 19:34 
Questionhow make a move next command?? Pin
meki_211816-Dec-08 18:27
meki_211816-Dec-08 18:27 
AnswerRe: how make a move next command?? Pin
Brij16-Dec-08 18:44
mentorBrij16-Dec-08 18:44 
GeneralRe: how make a move next command?? Pin
meki_211816-Dec-08 19:02
meki_211816-Dec-08 19:02 
GeneralRe: how make a move next command?? Pin
Brij16-Dec-08 19:29
mentorBrij16-Dec-08 19:29 
GeneralRe: how make a move next command?? Pin
meki_211816-Dec-08 20:00
meki_211816-Dec-08 20:00 
AnswerRe: how make a move next command?? Pin
Nishant Singh16-Dec-08 19:04
Nishant Singh16-Dec-08 19:04 
GeneralRe: how make a move next command?? Pin
meki_211816-Dec-08 19:12
meki_211816-Dec-08 19:12 
GeneralRe: how make a move next command?? Pin
Christian Graus16-Dec-08 19:16
protectorChristian Graus16-Dec-08 19:16 
GeneralRe: how make a move next command?? Pin
meki_211816-Dec-08 19:23
meki_211816-Dec-08 19:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.