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

Error connecting to SQL Azure for OpenAccess

1 Answer 137 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bill
Top achievements
Rank 1
Bill asked on 19 Mar 2013, 01:56 AM
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.


1 Answer, 1 is accepted

Sort by
0
Yordan
Telerik team
answered on 21 Mar 2013, 01:01 PM
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.
Tags
Design Time (Visual Designer & Tools)
Asked by
Bill
Top achievements
Rank 1
Answers by
Yordan
Telerik team
Share this question
or