Input string was not in a correct format

Thread is closed for posting
3 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    2 posts
    Member since:
    Jan 2014

    Posted 25 Jan 2014 Link to this post


    I decided to try and explore this tool today, so downloaded and installed the latest version. I'm using Visual Studio 2013 Professional.

    I have attempted to use code first creation of the db, and it seemed to work, in that I got no generation errors, and when I updated the database from the model, it created the tables as I expected.

    However, when I try to use it in code, I get the following:

    "An exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.dll but was not handled in user code

    Additional information: Input string was not in a correct format."

    This occurs on every single entity I try to query.

    Example code that causes this issue is:

    var dbContext = new HwyData.HwyEntitiesModel();
    var up = dbContext.UserProfiles.FirstOrDefault<UserProfile>();

    I even tried creating a single entity, with just an id and a string in it, and it still errored out for that.

    I'm at a loss as to what to do now as I'm clearly missing something.
  2. Jonathan
    Jonathan avatar
    2 posts
    Member since:
    Jan 2014

    Posted 26 Jan 2014 in reply to Jonathan Link to this post

    Just thought I'd follow up here. After struggling to no avail, I decided to just wipe out the tables from the database, wipe out the mappings and start again. 

    This time it worked. From what I can tell, I didn't do anything differently on the two attempts.
  3. Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 27 Jan 2014 Link to this post

    Hi Joathan,

    We are lazy opening the database, I guess that your connection string was wrong and we are checking it too late. If you can send us the stack trace I can tell you more.

    Because you have already solved the problem, I guess you do not have it anymore.


    Jan Blessenohl
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
Back to Top