Click here to Skip to main content
15,885,278 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem with Web Site Administration Tool Pin
JacSophie13-Jan-10 13:46
JacSophie13-Jan-10 13:46 
QuestionDisplay progress status information Pin
Ramkithepower2-Jun-09 20:15
Ramkithepower2-Jun-09 20:15 
AnswerRe: Display progress status information Pin
Christian Graus2-Jun-09 20:19
protectorChristian Graus2-Jun-09 20:19 
AnswerRe: Display progress status information Pin
Kapil Thakur2-Jun-09 21:29
Kapil Thakur2-Jun-09 21:29 
GeneralRe: Display progress status information Pin
Ramkithepower3-Jun-09 1:26
Ramkithepower3-Jun-09 1:26 
Questionbutton control in ajax accordion [modified] Pin
Ariful Islam Sabuz2-Jun-09 19:19
Ariful Islam Sabuz2-Jun-09 19:19 
AnswerRe: button control in ajax accordion Pin
Abhijit Jana2-Jun-09 19:21
professionalAbhijit Jana2-Jun-09 19:21 
QuestionSetting value for datarow if its null [modified] Pin
kishorgh2-Jun-09 19:16
kishorgh2-Jun-09 19:16 
i have datatable in which 2 row,1st column value is null
that column is datatype is DateTime.

wwhen i tried to add data to database..its gives me error as
Object cannot be cast from DBNull to other types.

i have done following..

foreach (DataRow dtRow in dtTrackingData.Rows)
{

SqlHelper.ExecuteNonQuery
(
myConnectionString
, "SP_NAME"
, iWeekNo
, Convert.ToInt32(dtRow["InvCoID"])
, Convert.ToDateTime(dtRow["LatestReportDateConsensus"])
, Convert.ToDateTime(dtRow["LatestReportDateVirtua"])
,dtFromDate
,dtToDate
,CreatedBy
);
}

i tried to add

if (dtRow["LatestReportDateConsensus"] == System.DBNull.Value)
dtRow["LatestReportDateConsensus"] =null;

still its not work..Frown | :(

how i will add value to datarow if its null

modified on Wednesday, June 3, 2009 1:22 AM

AnswerRe: Setting value for datarow if its null Pin
Kapil Thakur2-Jun-09 21:37
Kapil Thakur2-Jun-09 21:37 
GeneralRe: Setting value for datarow if its null Pin
kishorgh3-Jun-09 0:16
kishorgh3-Jun-09 0:16 
GeneralRe: Setting value for datarow if its null Pin
Kapil Thakur3-Jun-09 0:26
Kapil Thakur3-Jun-09 0:26 
GeneralRe: Setting value for datarow if its null Pin
kishorgh3-Jun-09 0:29
kishorgh3-Jun-09 0:29 
GeneralRe: Setting value for datarow if its null Pin
Kapil Thakur3-Jun-09 0:33
Kapil Thakur3-Jun-09 0:33 
GeneralRe: Setting value for datarow if its null Pin
kishorgh3-Jun-09 0:46
kishorgh3-Jun-09 0:46 
GeneralRe: Setting value for datarow if its null Pin
kishorgh3-Jun-09 0:59
kishorgh3-Jun-09 0:59 
QuestionRegarding deployment Pin
kumarjammula2-Jun-09 18:15
kumarjammula2-Jun-09 18:15 
AnswerRe: Regarding deployment Pin
Christian Graus2-Jun-09 18:28
protectorChristian Graus2-Jun-09 18:28 
AnswerRe: Regarding deployment Pin
Abhijit Jana2-Jun-09 18:38
professionalAbhijit Jana2-Jun-09 18:38 
QuestionExport data from datatable to Excel Pin
sarang_k2-Jun-09 17:52
sarang_k2-Jun-09 17:52 
AnswerRe: Export data from datatable to Excel Pin
Abhijit Jana2-Jun-09 18:41
professionalAbhijit Jana2-Jun-09 18:41 
AnswerRe: Export data from datatable to Excel Pin
Kapil Thakur2-Jun-09 22:01
Kapil Thakur2-Jun-09 22:01 
Questionproblem Pin
battulga_dddddd2-Jun-09 17:43
battulga_dddddd2-Jun-09 17:43 
AnswerRe: problem Pin
Christian Graus2-Jun-09 18:12
protectorChristian Graus2-Jun-09 18:12 
GeneralRe: problem Pin
battulga_dddddd3-Jun-09 15:39
battulga_dddddd3-Jun-09 15:39 
QuestionCan I expand an ajax collapsiblepanel from a button in a different user control? Pin
Goalie352-Jun-09 16:17
Goalie352-Jun-09 16:17 

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.