forum

Home / DeveloperSection / Forums / how i'm going to include connection file in vb.net?

how i'm going to include connection file in vb.net?

Manoj Bhatt 2076 11-Jun-2013
Hi Expert,

I'm using vb.net and oracle. this is my code connection with db

I want to establish connection string in VB.NET with Oracle database as following   

Dim connectionString As String = "Data Source = abc; User ID = abc; Password = abc;"
Dim sqlConnection As OracleClient.OracleConnection = New OracleClient.OracleConnection(connectionString)

It's work fine, but when I put connection string into apps.config, that's not working. My line of code as following

<add key="abc_connection" value="server=xyz;User ID=abc;Password=abc;database=abc;Connection Timeout=0"/>

what line of code I should use for replacing my code connection above ? so that i can call the apps.config file instead of using the code connection repeatedly.

Thanks in advance. 

Updated on 12-Jun-2013

Can you answer this question?


Answer

1 Answers

Liked By