locked
"Root element is missing." when running query RRS feed

  • Question

  •  

    Hi,

     

    I'm new to Linq to SQL I'm getting the following error "Root  element is missing" when runnign even the simpliest of query..

     

    here is my code,  if someone could please help it would be great

     

    try

    {

    MyDataClassesDataContext odb = new MyDataClassesDataContext();

    var queryAllCustomers = from p in odb.RegisteredUsers

    where p.Verified == true

    select p;

    int nCount = queryAllCustomers.Count();  // this returns 57

    foreach (var p in queryAllCustomers)  // This is the line where I get the "Root element is missing" error

    {

    }

    }

    catch (Exception oEx)

    {

    string sError = oEx.Message;

    }

    Saturday, March 8, 2008 5:31 PM

Answers

  • Does the RegisteredUser have a XML field? If so, check if the xml in it is valid.

    HTH,
    Maurycy
    Sunday, March 9, 2008 10:12 AM