Error connecting to SQL Azure for OpenAccess

2 posts, 0 answers
  1. Bill
    Bill avatar
    42 posts
    Member since:
    Feb 2011

    Posted 18 Mar 2013 Link to this post

    I am trying to create an OpenAccess Data model connecting to my SQL Azure database using the new domain model wizard
    ORM- latest free version.
    I am getting a login error

    I can create a sql data source connecting to the azure db fine and can connect to it fine via management studio

    The connection string sql azure management web site gave me is:

    Server=tcp:MYDATABASE.database.windows.net,1433;Database=[MYDBNAME];User ID=XXX@XXXXXX;Password=MyPassword;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;

    I selected Microsoft SQl Azure as the backend in the open access wizard

    I get this error:

    Unable to retrieve database schema information.
    Reason: Cannot open database "[XXXX]"  requested by the login. The login failed.
    Login failed for user 'XXXX'.
    The session has been assigned a tracking ID blah blah blah...

    I think my connect string is correct.
    From the Telerik documentation:
    (http://www.telerik.com/help/openaccess-orm/getting-started-root-quickstart-azure-connect-through-ssms.html)

    In the Connection String field enter the following connection string.

    Server=tcp:server_name.database.windows.net;Database=SofiaCarRental;User ID=user_name@server_name;Password=myPassword;Trusted_Connection=False;Encrypt=True;

    You should specify the following parameters in the connection string:
    -server_name - the name of your assigned server.
    -user_name - this is a valid logon user granted to use the SofiaCarRental. By default you could use the database master.
    -myPassword - your password.


  2. Yordan
    Admin
    Yordan avatar
    39 posts

    Posted 21 Mar 2013 Link to this post

    Hello Bill,

    When connecting to SQL Azure there are few things that need to be done:

    1) Make sure that the Azure firewall permits connections
    2) Get the correct connection string from the MS Azure site
    3) When connecting in Visual Studio using OpenAccess the backend is Microsoft SQL Azure
    4) In the connection string the database name is not enclosed with parenthesis - []

    This is an example of working connection string with OpenAccess:

    Server=tcp:qn9as8u4jss.database.windows.net,1433;Database=SofiaCarRental21;User ID=John@qn9as8u4js;Password=mySecretPass;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;

    Please see the attached picture for guidance where to find the connection string in your case.

    I hope that helps. Please get back to us if you still experience any issues connecting to MS Azure with OpenAccess ORM.

    Regards,
    Yordan
    the Telerik team
    Free Webinar: OpenAccess Integration in Sitefinity. SIGN UP NOW.
  3. DevCraft banner
Back to Top