Page 1 of 1

ConnectionString as parameter !!!

Posted: Fri 09 Jan 2009 14:06
by mirra
Hello!
I have so problem, as:
I create edm in VS 2008 Entity FrameWork.
Devart dotConnect for Oracle 5.0.16.0
Automatically was created file App.Config:
---------------------------------------------------------









-------------------------------------------------------
When I usining:
using (Entities entities = new Entities()) {...}
whithout parameter CONNECT IS Successfully!!! ConnectioString from App.Config

But when I usining :
---------------------------------------------------
string connectionString = "metadata=res://*/EDM.csdl|res://*/EDM.ssdl|res://*/EDM.msl;provider=Devart.Data.Oracle;provider connection string="User Id=EDM;Password=edm;Server=ORCL_TEST"";
using (Entities entities = new Entities(connectionString)) {...}

ArgumentExceprion was unhandled
The key word is not supported: ' user id '.

Help me, please!! I need pass ConnectioString sa parameter.[/b]

Posted: Fri 09 Jan 2009 15:06
by AndreyR
You should change to , like following:

Code: Select all

string connectionString = "metadata=res://*/EDM.csdl|res://*/EDM.ssdl|res://*/EDM.msl;provider=Devart.Data.Oracle;provider connection string=\"User Id=EDM;Password=edm;Server=ORCL_TEST\""

Posted: Fri 09 Jan 2009 15:37
by mirra
Connect is IS Successfully!!!
Thanks you!! :)

Posted: Fri 20 Feb 2009 15:49
by matthias.max
WHat about doing this in Visual Basic?

The \" term to include in a string which itself if surrounded by "" is not possible here.

Thanks!

Posted: Tue 24 Feb 2009 08:38
by AndreyR
Replace the \" with "" in your VB.NET code.