This question is locked. New answers and comments are not allowed.
Im trying to use sql azure database with telerik orm. I was able to create a rlinq file with schema, but when im tring to querry some objects i got error - Wrong database backend configuration detected , it says that server where it tryes to connect is sql server but confugured as azure.
6 Answers, 1 is accepted
0
Hello,
When you use the 'Domain Model' wizard and specify the connection string, you also have an option to select the backend. The default is SqlServer; but you should select 'SQL Azure' there. If you leave it as SqlServer, OpenAccess can read the schema because the connection string is valid but the generated rlinq file is configured for SqlServer.
Do get back in case you need further assistance.
Greetings,
Ady
the Telerik team
When you use the 'Domain Model' wizard and specify the connection string, you also have an option to select the backend. The default is SqlServer; but you should select 'SQL Azure' there. If you leave it as SqlServer, OpenAccess can read the schema because the connection string is valid but the generated rlinq file is configured for SqlServer.
Do get back in case you need further assistance.
Greetings,
Ady
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
0
Grant Drury-Green
Top achievements
Rank 1
answered on 13 Oct 2012, 04:49 AM
Not sure how to work with this in practice.
I develop against a local Sql 2008 (Express) database, and deploy to Sql Azure.
From what I'm reading I have to compile 2 different assemblies to target the different back ends?? Having an environment specific assembly is not my idea of a good time...
Can this be done via configuration? Any other suggestions?
I develop against a local Sql 2008 (Express) database, and deploy to Sql Azure.
From what I'm reading I have to compile 2 different assemblies to target the different back ends?? Having an environment specific assembly is not my idea of a good time...
Can this be done via configuration? Any other suggestions?
0
Hi ,
You can add another constructor to the class that takes in BackendConfiguration instance and a connection string - as below
You can this use this constructor with an explicit BackendConfiguration instance which sets the backend to 'Azure' - new BackendConfiguration { Backend = "Azure", ProviderName = "System.Data.SqlClient"}).
Alternatively you can factor out the GetBackendConfiguration generated method to provide the appropriate backend configuration.
Do get back in case you need further assistance.
Kind regards,
Ady
the Telerik team
You can add another constructor to the class that takes in BackendConfiguration instance and a connection string - as below
public
partial
class
EntityDiagrams2
{
public
EntityDiagrams2(
string
connection, BackendConfiguration backendConfiguration)
:
this
(connection, backendConfiguration, metadataSource)
{
}
}
You can this use this constructor with an explicit BackendConfiguration instance which sets the backend to 'Azure' - new BackendConfiguration { Backend = "Azure", ProviderName = "System.Data.SqlClient"}).
Alternatively you can factor out the GetBackendConfiguration generated method to provide the appropriate backend configuration.
Do get back in case you need further assistance.
Kind regards,
Ady
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
0
Fawad
Top achievements
Rank 1
answered on 12 Feb 2013, 11:31 AM
Old thread but thanks a lot for that tip Ady, solved my problem too. :)
Regards.
Regards.
0
Magnus
Top achievements
Rank 1
answered on 06 Apr 2016, 09:38 AM
Hi,
Is this metod still compatible with version 2015.1.225 of DataAccess? (As I have not yet migrated to the NuGet-based version).
If so, can you please elaborate where, in which files, I should put the code in your example.
Regards.
0
Hi Magnus,
Are you still using the Visual Studio designer to generate the context?
You can put the code in a partial 'OpenAccessContext' class. The designer will generate an 'OpenAccessContext' derived class for you. You should create a partial class for this and put the code there.
Do get back in case you need further assistance.
Regards,
Ady
Telerik
Are you still using the Visual Studio designer to generate the context?
You can put the code in a partial 'OpenAccessContext' class. The designer will generate an 'OpenAccessContext' derived class for you. You should create a partial class for this and put the code there.
Do get back in case you need further assistance.
Regards,
Ady
Telerik
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.