Friday, April 29, 2011

0x80070057

Here i write a Two conditions like as below

SPWeb web = SPContext.Current.Web;
SPList list = web.Lists["Student Profile"];
string caml = string.Format(@"{0}{1}", DropDownList2.Text,DropDownList3.Text);
SPQuery query = new SPQuery(list.DefaultView);
query.Query = caml;
SPListItemCollection items = list.GetItems(query);
st_attendence.DataSource = items.GetDataTable();
st_attendence.DataBind();
Controls.Add(st_attendence);

In above code i used two condions (Academic Year and Class). At this time getting this Error

0x80070057

If i write one condition it works fine. But it does't work for 2 or 3 conditions



-------------------


ans :


I have also spent lot time in this found that the spquery tag are case sensitive and i was using instead of



Just make sure you are writing the exact query syntax..

No comments:

Post a Comment