This is a migrated thread and some comments may be shown as answers.

Identity Mechanism and exception: LoggingDbDataReader to type SqlDataReader

2 Answers 40 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Waqar
Top achievements
Rank 1
Waqar asked on 13 Nov 2014, 09:33 AM
I created my model from the existing database. And then i modified Identity Mechanism to HighLow for a single domain class OMS_COUNTRY. I used that class here as:

public ActionResult _Read([DataSourceRequest]DataSourceRequest request)
        {
            IQueryable<OMS_COUNTRY> CustomerList = this.dbContext.OMS_COUNTRies;
            DataSourceResult result = CustomerList.ToDataSourceResult(request
                , ModelState
                , c => new OMS_COUNTRYViewModel
                {
                    OMS_COUNTRY_ID = c.OMS_COUNTRY_ID,
                    COUNTRYNAME = c.COUNTRYNAME,
                    ABBREVIATION = c.ABBREVIATION
                });

            return Json(result);
        }

This code was working till I modify Identity Mechanism to HighLow for all the rest of the classes. After changing the Identity Mechanism for every domain class to HighLow the existing code above throw this exception.

Unable to cast object of type 'Telerik.OpenAccess.Runtime.Logging.LoggingDbDataReader' to type 'System.Data.SqlClient.SqlDataReader'.



2 Answers, 1 is accepted

Sort by
0
Waqar
Top achievements
Rank 1
answered on 13 Nov 2014, 10:41 AM
Finally i managed to come out from this error by inserting rows in voa_keygen for each table that is using HighLow

insert into voa_keygen values('OMS_PURCHASEORDER', 0); -- OMS_PURCHASEORDER is a table name using HighLow
0
Thomas
Telerik team
answered on 18 Nov 2014, 05:19 PM
Thanks for reporting this issue. I will try to reproduce this problem tomorrow and will let you now about the results.

Regards,
Thomas
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Development (API, general questions)
Asked by
Waqar
Top achievements
Rank 1
Answers by
Waqar
Top achievements
Rank 1
Thomas
Telerik team
Share this question
or