Notifications require SQL Server 9.0 or later
-
Hi, I am trying to use the Sqlcachedependency in my application but am getting error... step1) Enabled notification service of the database step2) enabled notification service of the Table step3) coding in asp.net2.0 protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { DataTable tbl1 = new DataTable(); tbl1 = (DataTable) Cache.Get("tbl"); if (tbl1 == null) { tbl1 = fnloadgrid(); lbl.Text = System.DateTime.Now.ToString(); } grd.DataSource = tbl1.DefaultView; grd.DataBind(); } } public DataTable fnloadgrid() { if (Con.State == ConnectionState.Closed) { Con.ConnectionString = Constr.ConnectionString; Con.Open(); Cmd.Connection = Con; Cmd.CommandType = CommandType.StoredProcedure; Cmd.CommandText = "Sp_Select"; Cmd.Parameters.Add("@Tabid", SqlDbType.Int).Value = 1; SqlCacheDependency Depend = new SqlCacheDependency(Cmd); Da.SelectCommand = Cmd; Da.Fill(Ds, "tbl"); tbl = Ds.Tables[0]; Cache.Insert("tbl", tbl, Depend); } return tbl; } note: while filling am getting error like as follows, Notifications require SQL Server 9.0 or later. so what is this Error ..can u clear me plz.......? Regards, kannak.......
kannak
-
Hi, I am trying to use the Sqlcachedependency in my application but am getting error... step1) Enabled notification service of the database step2) enabled notification service of the Table step3) coding in asp.net2.0 protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { DataTable tbl1 = new DataTable(); tbl1 = (DataTable) Cache.Get("tbl"); if (tbl1 == null) { tbl1 = fnloadgrid(); lbl.Text = System.DateTime.Now.ToString(); } grd.DataSource = tbl1.DefaultView; grd.DataBind(); } } public DataTable fnloadgrid() { if (Con.State == ConnectionState.Closed) { Con.ConnectionString = Constr.ConnectionString; Con.Open(); Cmd.Connection = Con; Cmd.CommandType = CommandType.StoredProcedure; Cmd.CommandText = "Sp_Select"; Cmd.Parameters.Add("@Tabid", SqlDbType.Int).Value = 1; SqlCacheDependency Depend = new SqlCacheDependency(Cmd); Da.SelectCommand = Cmd; Da.Fill(Ds, "tbl"); tbl = Ds.Tables[0]; Cache.Insert("tbl", tbl, Depend); } return tbl; } note: while filling am getting error like as follows, Notifications require SQL Server 9.0 or later. so what is this Error ..can u clear me plz.......? Regards, kannak.......
kannak