Hand connectionstring over instead of web.config

Hand connectionstring over instead of web.config

Postby matthias.max » Fri 20 Feb 2009 15:55

Hi,

I have an ASP.Net projewct with a DataContext created with dotConnect.
The created class autom. fetches its connection info out of the web.config where it looks like this:

Code: Select all
   

   



How can I set the connection string programmatically in Visual Basic?
If I copy that string into a String variable I get an error. Even if I replace the " with chr(34).

Thanks!
matthias.max
 
Posts: 3
Joined: Fri 21 Nov 2008 12:00

Postby AndreyR » Tue 24 Feb 2009 08:41

You can use a code like the following:
Code: Select all
Dim db As New Entities("metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Devart.Data.Oracle;provider connection string=""User Id=***;Password=***;Server=***;Persist Security Info=True""")
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for Oracle