Page 1 of 1

dataservicequeryexception was unhandled by user code...

Posted: Mon 07 Feb 2011 09:39
by RajeevDebnath
Hi

I am using dotConnect with Silverlight and I am getting following error while retreiving the recordset.

Code: Select all

  
      private void Loadgrid(object sender, EventArgs e)
        {
            FrameworkElement objFrameworkElement;
            DataGrid objDataGrid = new DataGrid();
            objFrameworkElement = ControlHelper.GetControlByName(m_objFrameworkElement, "BKMGMT_DATAGRID");
            objDataGrid = (DataGrid)objFrameworkElement;
            Uri uri2 = new Uri(System.Windows.Browser.HtmlPage.Document.DocumentUri, "CMSDataService_Multitable.svc");
            CMSDataService_MultitableEntities context2 = new CMSDataService_MultitableEntities(uri2);
            var query2 = from b in context2.V_TXS_BOOKING
                         select b;
            objDataGrid.ItemsSource = null;
            var dsQuery2 = (System.Data.Services.Client.DataServiceQuery)query2;
            List loadedProducts = new List();
            dsQuery2.BeginExecute(new AsyncCallback(c =>
                {
                    IEnumerable result2 = dsQuery2.EndExecute(c);
                    loadedProducts = result2.ToList();
                    objDataGrid.ItemsSource = loadedProducts;
                }), dsQuery2);             
        }

I am getting an exception in dsQuery2.EndExecute(c); location.

Please assist.

Thanks,
Rajeev

Posted: Tue 08 Feb 2011 15:16
by AndreyR
Could you please provide some details about the problem, e.g. the exception message and call stack?
If possible, send us a small test project illustrating the problem.

Posted: Wed 09 Feb 2011 07:11
by RajeevDebnath
Issue is resolved, as I was using two version of Oracle client. I need to use only one.

Posted: Wed 09 Feb 2011 13:07
by AndreyR
Thank you for the clarification. Feel free to contact us if you have any question concerning our components.