Click here to Skip to main content
15,398,575 members

Comments by developerit (Top 18 by date)

developerit 25-Jan-17 1:28am View
   
this submit button is for add to data base only..but the result is same
developerit 12-Sep-16 12:09pm View
   
thanks a lot it works for me...
developerit 12-Sep-16 12:08pm View
   
thanks a lot it works for me...
developerit 4-Feb-13 6:28am View
   
Please any body help me for this issue.....
developerit 2-Feb-13 7:29am View
   
ihave changd the procedure to this but still same problem

ALTER PROCEDURE testing(@packcode varchar(50),@phone varchar(10),@startdate datetime=null,@enddate datetime=null)

as
begin
IF EXISTS(select * from Test where packcode=@packcode)

update Test set phone=@phone,startdate=@startdate,enddate=@enddate where packcode=@packcode

else insert into Test(packcode,phone,startdate,enddate)values(@packcode ,@phone ,@startdate ,@enddate )
end
and i changed the code also
and iam passing this date format
2013-02-02T08:27:24.994+03:00
when iam not passing it is giving me error
developerit 26-Jan-13 6:17am View
   
thank a lot for CodeProject Team finally it helped me......
developerit 25-Dec-12 2:50am View
   
thanks it helps me alot
developerit 2-Dec-12 3:32am View
   
thanks , problem is solved.......
developerit 30-Jun-12 8:50am View
   
this.Page.ClientScript.RegisterStartupScript(GetType(), "dd1", "<script language="'javascript'">window.opener.location.href=http://localhost:9880/testProject/Home.aspx?username='"+UserName+"'&Pass='"+Pass+"'; self.close();</script>");
developerit 30-Jun-12 2:40am View
   
thanks it helps me a lot
developerit 25-Jun-12 8:02am View
   
hi i have used the above code
but still it is giving error can you correct me

string username = "abc";
string pwd = "123";
this.Page.ClientScript.RegisterStartupScript(GetType(), "dd1", "<script language="'javascript'">window.opener.location.href=http://10.15.4.48/boxmachine-layout/HQIT159?username='" + username + "'&Pass='" + pwd + "'; self.close();</script>");

can you correct me
developerit 17-Jun-12 6:48am View
   
hi,can you help me please where i can insert null value in stored procedure

below is iam using stored procedure

Create procedure ProPackStatus(@employeeid int,@expirationTime datetime,@avizoTime datetime )

as begin

IF EXISTS(select * from tbl_PackStatus where employeeid=@employeeid)

update tbl_PackStatus set expirationTime=@expirationTime,avizoTime=@avizoTime where employeeid=@employeeid

ELSE insert into tbl_PackStatus (@employeeid,@expirationTime ,@avizoTime)

end
developerit 4-Jun-12 4:44am View
   
i have tried below code also it gives me same error no change

if(avizoTime==null)
{
MyCommand.Parameters.AddWithValue("@avizoTime",DBNull.Value);
}
else
{
MyCommand.Parameters.AddWithValue("@avizoTime",(avizoTime).ToUniversalTime());
}

can you suggest me another idea
developerit 4-Jun-12 2:57am View
   
i have used both the option
1.@avizoTime by default null
MyCommand.Parameters["@expirationTime"].Value = null;

2. DBNULL.Value
MyCommand.Parameters.AddWithValue("@expirationTime", DBNull.Value);


both are giving the same error

System.ArgumentException: Cannot convert to System.DateTime.
Parameter name: type ---> System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.Convert.ToDateTime(String value, IFormatProvider provider)
at System.String.System.IConvertible.ToDateTime(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Web.Services.Protocols.ScalarFormatter.FromString(String value, Type type)
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.ScalarFormatter.FromString(String value, Type type)
at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection)
at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest request)
at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()


can you please help me to solve this problem
developerit 27-Mar-12 4:21am View
   
Thanks for Code Project Team....Really It Helps Me a lot.....
developerit 26-Mar-12 8:22am View
   
default value zero i want to give because if user doent gives value then webservice gives me error
developerit 23-Jan-12 0:45am View
   
THIS SOLUTION YOU PROVIDE ME IS GOOD BUT THIS APPLYING COLOR FOR COMPLETE ROW , BUT I NEED TO APPLY FOR STATUS CELL VALUE IN GRIDVIEW, CAN YOU GIVE EXAMPLE WHERE I HAVE CHANGE FOR CELL VALUE..
developerit 7-Dec-11 5:32am View
   
I have converted Book1.xlsx to Book1.xls through Excel. and use the same code it still not working