Because the Net method gives often for some people problems, there is in VB
the much easier namespace My which contains the shared class
My.Settings
Have a look at that
Cor
"Sincere" <(E-Mail Removed)> wrote in message
news:0DF096F7-37F1-4A08-A62B-(E-Mail Removed)...
> Hello,
>
> I am having probelms reading the app.config file. I have stored my
> connectionstring as follows.
>
> <add name ="ReqCon" connectionString =
> "Data Source= {local};Initial Catalog=Tasks_Sch;
> Integrated Security=SSPI" providerName ="System.Data.SqlClient"/>
> </connectionStrings>
>
>
> Following is the code in the data layer class:
>
> Imports System
> Imports Microsoft.ApplicationBlocks.Data
> Imports System.Data
> Imports System.Data.SqlClient
> Imports System.Configuration.ConfigurationManager
> Imports System.Configuration
>
>
> Dim strConnect As String =
> System.Configuration.ConfigurationManager.AppSettings("ReqCon")
> cn.ConnectionString = (strConnect)
> cn.Open()
>
> Database server am using is SQL 2005
>
>
> TIA
>
> Regards
|