Code Project

Link Unit

Tuesday, March 18, 2008

Method Error : 12030

While I was trying to make this sample work
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Walkthrough/CCDWithDB.aspx
The following error appeared
1) Method Error 12030
2) Method Error 12031
3) Method Error 500
How I solved it??
1) Specify [System.Web.Script.Services.ScriptService()] before Class defination in Web Service.
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService()]
public class CarData : WebService
2) Check the name of method is correct as it is defined in Web Service and specified in Cascadedropdown.
3) Install Fiddler program. http://www.fiddlertool.com/Fiddler2/version.asp . It is an excellent Http Debugger.
Hope this help fellow visitors

Sunday, March 09, 2008

Using SQL Server to get Calendar

I was going through this excellent blog http://blog.sqlauthority.com/ and seen the method used by the author Pinal Dave. I tried to do the same using another method. Hope visitors like it.

Create a sequence Table

Select identity(int,1,1) seq into Numbers from sysobjects s , sysobjects so

declare @d datetime

declare @d1 datetime

Set @d1=getdate()-10

set @d= dateadd(d,-day(@d1) + 1,@d1 )

Select @d
Select Isnull(Convert(varchar(12),Min(Case When datepart(dw,@d+N.seq-1)=1 then @d+N.seq-1 else null end),106),'') Monday,

Isnull(Convert(varchar(12),Min(Case When datepart(dw,@d+N.seq-1)=2 then @d+N.seq-1 else null end),106),'')Tuesday,

Isnull(Convert(varchar(12),Min(Case When datepart(dw,@d+N.seq-1)=3 then @d+N.seq-1 else null end),106),'') Wednesday,

Isnull(Convert(varchar(12),Min(Case When datepart(dw,@d+N.seq-1)=4 then @d+N.seq-1 else null end),106),'') Thursday,

Isnull(Convert(varchar(12),Min(Case When datepart(dw,@d+N.seq-1)=5 then @d+N.seq-1 else null end),106),'') Friday,

Isnull(Convert(varchar(12),Min(Case When datepart(dw,@d+N.seq-1)=6 then @d+N.seq-1 else null end),106),'') Saturday,

Isnull(Convert(varchar(12),Min(Case When datepart(dw,@d+N.seq-1)=7 then @d+N.seq-1 else null end),106),'') Sunday

From Numbers N where seq between 1 and 31 and month(@d+N.seq-1) = month(@d)

Group by DatePart(wk,@d+N.seq-1)


Tuesday, March 04, 2008

Parser Error Message: Could not load file or assembly;System.Web.Extensions

Parser Error Message: Could not load file or assembly;System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; or one of its dependencies. The system cannot find the file specified.
I was facing this problem ,while installing prototype of a web application . Searched through the net and figured out that Ajax was not installed. following steps solved my issue.
  1. Downloaded the ajax from http://asp.net/ajax/downloads
  2. In the project I added a reference to System.Web.Extensions and System.Web.Extensions.Design

I hope this also helps you.