Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
QuestionSource Control Pin
CodingYoshi8-Jan-09 5:48
CodingYoshi8-Jan-09 5:48 
AnswerRe: Source Control Pin
Lev Danielyan8-Jan-09 5:52
Lev Danielyan8-Jan-09 5:52 
AnswerRe: Source Control Pin
DaveyM698-Jan-09 5:54
professionalDaveyM698-Jan-09 5:54 
AnswerRe: Source Control Pin
User 66588-Jan-09 6:24
User 66588-Jan-09 6:24 
QuestionCreating a label without absolutely no padding Pin
version2_18-Jan-09 5:40
version2_18-Jan-09 5:40 
AnswerRe: Creating a label without absolutely no padding Pin
Lev Danielyan8-Jan-09 5:44
Lev Danielyan8-Jan-09 5:44 
AnswerRe: Creating a label without absolutely no padding Pin
Not Active8-Jan-09 5:56
mentorNot Active8-Jan-09 5:56 
QuestionError converting data type nvarchar to datetime, any suggestion Pin
suni_dotnet8-Jan-09 4:52
suni_dotnet8-Jan-09 4:52 
hi,
cmd.CommandType = CommandType.StoredProcedure;
string filldate = GridView2.Rows[e.RowIndex].Cells[2].Text;
string freedate = GridView2.Rows[e.RowIndex].Cells[3].Text;
cmd.Parameters.AddWithValue("@filleddate",filldate);
cmd.Parameters.AddWithValue("@freedate", freedate);
cmd.Parameters.AddWithValue("@nameofcustomer", GridView2.Rows[e.RowIndex].Cells[6].Text);
try
{
con.Open();
SqlDataReader reader = cmd.ExecuteReader();


}
and stored procedure is:


Insert into PresidentialSuite(DateWhenFilled,DateWhenFree,NameOfCustomer)
values (@filleddate,@freedate,@nameofcustomer);

SET @filleddate = Convert(datetime,@filleddate);
SET @freedate = Convert(datetime,@freedate);

Iam not converting any nvarchar to datetime. why iam getting this error.
i tried number of ways of converting string to datetime in my C# code, but failed. so i used stored procedure.
thanks in advance
AnswerRe: Error converting data type nvarchar to datetime, any suggestion Pin
Ashfield8-Jan-09 5:03
Ashfield8-Jan-09 5:03 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
suni_dotnet8-Jan-09 5:19
suni_dotnet8-Jan-09 5:19 
AnswerRe: Error converting data type nvarchar to datetime, any suggestion Pin
Not Active8-Jan-09 5:26
mentorNot Active8-Jan-09 5:26 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
suni_dotnet8-Jan-09 6:12
suni_dotnet8-Jan-09 6:12 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
Not Active8-Jan-09 6:24
mentorNot Active8-Jan-09 6:24 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
suni_dotnet8-Jan-09 6:44
suni_dotnet8-Jan-09 6:44 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
Not Active8-Jan-09 6:55
mentorNot Active8-Jan-09 6:55 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
suni_dotnet8-Jan-09 7:21
suni_dotnet8-Jan-09 7:21 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
Not Active8-Jan-09 7:23
mentorNot Active8-Jan-09 7:23 
AnswerRe: Error converting data type nvarchar to datetime, any suggestion Pin
musefan8-Jan-09 5:37
musefan8-Jan-09 5:37 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
suni_dotnet8-Jan-09 5:51
suni_dotnet8-Jan-09 5:51 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
musefan8-Jan-09 6:03
musefan8-Jan-09 6:03 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
suni_dotnet8-Jan-09 6:29
suni_dotnet8-Jan-09 6:29 
AnswerRe: Error converting data type nvarchar to datetime, any suggestion Pin
Jon Rista8-Jan-09 6:15
Jon Rista8-Jan-09 6:15 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
Not Active8-Jan-09 6:31
mentorNot Active8-Jan-09 6:31 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
Jon Rista8-Jan-09 7:31
Jon Rista8-Jan-09 7:31 
GeneralRe: Error converting data type nvarchar to datetime, any suggestion Pin
Not Active8-Jan-09 8:06
mentorNot Active8-Jan-09 8:06 

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.