ConnectionString as parameter !!!

ConnectionString as parameter !!!

Postby mirra » Fri 09 Jan 2009 14:06

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:
---------------------------------------------------------





providerName="System.Data.EntityClient" />
connectionString="User Id=EDM;Password=edm;Server=ORCL_TEST;Home=OraDb10g_home1;Persist Security Info=True"
providerName="Devart.Data.Oracle" />


-------------------------------------------------------
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]
mirra
 
Posts: 12
Joined: Fri 09 Jan 2009 13:29
Location: Ukraine

Postby AndreyR » Fri 09 Jan 2009 15:06

You should change <&quot;> 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\""
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby mirra » Fri 09 Jan 2009 15:37

Connect is IS Successfully!!!
Thanks you!! :)
mirra
 
Posts: 12
Joined: Fri 09 Jan 2009 13:29
Location: Ukraine

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

WHat about doing this in Visual Basic?

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

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

Postby AndreyR » Tue 24 Feb 2009 08:38

Replace the \" with "" in your VB.NET code.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for Oracle