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

Informations about Database.Get

3 Answers 32 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wolfgang
Top achievements
Rank 1
Wolfgang asked on 25 Oct 2012, 01:33 PM
Hi,

where can i find the informations for Database.Get? I'm interessted in values for configOverride, especially how to give a Port for a database.

Thx in advance

3 Answers, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 26 Oct 2012, 07:21 AM
Hi Wolfgang,

I am not quite sure why you want to work with the Database object itself. 
The best way to specify a port for a database in my opinion is to provide this information within your connection string. There you are able to specify whatever is supported by the respective database.
See this link for details how to do this. 
When working with the Context, there is also no need to use this method. You can override the OnDatabaseOpen method to tweak the BackendConfiguration and/or the MetaDataContainer in the way that fits your purpose.
Nevertheless, if you want to use the old approach you can use the Database.Get method as well. See this documentation for details. Regarding the valid values there, you might find this link useful.

I hope this information is helpful for you.
Do come back if you need further assistance.

Kind regards,
Ralph
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
0
Wolfgang
Top achievements
Rank 1
answered on 26 Oct 2012, 07:44 AM
Hi, I work at a new job where classic Telerik API is used. A connection to databases should be created on the fly (and not in app/wep config). The message with connection string looks quite nice, but it's the classic api...

The manual in  link didn't help so much.

What i was missing was the port. I found out that the database objects shows the port, if it is given in servername (like below):

<servername>{server}:{port}</servername>

 

 

 

0
Ralph Waldenmaier
Telerik team
answered on 26 Oct 2012, 09:19 AM
Hi Wolfgang,

I am not quite sure if your problem is gone when you use the approach you provided but you can also specify a connection string in the following manner.

<connectionString>Data Source=SOMEDATASOURCE;User ID=USER;Password=PASSWORD;</connectionString>
Of course the connection string needs to be customized to fit your needs.

Feel free to ask if you have any other question.Kind regards,
Ralph
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Tags
Getting Started
Asked by
Wolfgang
Top achievements
Rank 1
Answers by
Ralph Waldenmaier
Telerik team
Wolfgang
Top achievements
Rank 1
Share this question
or