Date query

3 posts, 0 answers
  1. Nils C.
    Nils C. avatar
    41 posts
    Member since:
    Oct 2009

    Posted 17 Oct 2012 Link to this post


    we just switched from linq2sql to oAORM and now many querys not working any more. Why is for example the following query not working? I don't understand the failure..

    Public Function check_bruteversuch(user As String) As Boolean

            Dim max_zeit As New TimeSpan(0, 10, 0)

            Dim bruteforce = (From it In _dbmaster.Loginspeicher _

                              Where it.Customer = HttpContext.Current.Request.Url.Host.ToString _

                              And it.Benutzername = user _

                              And it.War_erfolgreich = False _

                              And (Now - it.Datum) < max_zeit _

                              Select it).Count

    An exception occured during the execution of 'Extent<pms_neu.Loginspeicher>().Where(it => (((Convert(((CompareString(it.Customer, HttpContext.Current.Request.Url.Host.ToString(), False) == 0) And (CompareString(it.Benutzername, value(pms_neu.login_helper+_Closure$__1).$VB$Local_user, False) == 0))) And (it.War_erfolgreich == Convert(False))) And ((Convert(DateAndTime.Now) - it.Datum) < Convert(value(pms_neu.login_helper+_Closure$__1).$VB$Local_max_zeit))) ?? False)).Select(it => it).Count()'. Failure: No AdoTypeConverter has been registered for the clrType.

  2. Alexander
    Alexander avatar
    727 posts

    Posted 18 Oct 2012 Link to this post

    Hello Nils,

    OpenAccess uses the so called "AdoTypeConverters" which translate the database data types to CLR types. It seems for some of the properties in your model there is no converter set. Did you use the Convert from L2S to OpenAccess model wizard or created the model manually from your database? If you used the conversion wizard, this could be a problem which we need to fix.
    Unfortunately we will not be able to help much without looking at your model. Could you plеase send us a support ticket and attach your rlinq file, so we could test it on our side?

    Kind regards,
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  3. DevCraft banner
  4. Nils C.
    Nils C. avatar
    41 posts
    Member since:
    Oct 2009

    Posted 18 Oct 2012 Link to this post


    the latest internal build (924) fixed the problem for me! :)


Back to Top