473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

connection string syntax in page using config file

I'm trying out a whole bunch of new (to me) techniques. Using asp.net 2
(vb), can someone correct my connection syntax. The problem seems to be
that I'm not properly referening the config settings in my aspx page.

Thanks!

Compiler Error Message: BC30456: 'connectionStrings' is not a member of
'Configuration'.

strConnectString = System.configuration.connectionStrings("DRPTWeb")

My web.config file:

<configuration>

<connectionStrings>

<add name="DRPTWeb" connectionString="Data Source=DRPT-DEV01;Initial
Catalog=DRPT....etc....." providerName="System.Data.SqlClient" />

</connectionStrings>


Feb 8 '06 #1
4 2046
It should be
System.Configuration.ConfigurationManager.Connecti onStrings("DRPTWeb").
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"D. Shane Fowlkes" <sh**********@h-o-t-m-a-i-l.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
I'm trying out a whole bunch of new (to me) techniques. Using asp.net 2
(vb), can someone correct my connection syntax. The problem seems to be
that I'm not properly referening the config settings in my aspx page.

Thanks!

Compiler Error Message: BC30456: 'connectionStrings' is not a member of
'Configuration'.

strConnectString = System.configuration.connectionStrings("DRPTWeb")

My web.config file:

<configuration>

<connectionStrings>

<add name="DRPTWeb" connectionString="Data Source=DRPT-DEV01;Initial
Catalog=DRPT....etc....." providerName="System.Data.SqlClient" />

</connectionStrings>



Feb 11 '06 #2
strConnectString =
System.Configuration.ConfigurationManager.Connecti onStrings("DRPTWeb").ConnectionString

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:uo*************@TK2MSFTNGP12.phx.gbl...
It should be
System.Configuration.ConfigurationManager.Connecti onStrings("DRPTWeb").
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"D. Shane Fowlkes" <sh**********@h-o-t-m-a-i-l.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
I'm trying out a whole bunch of new (to me) techniques. Using asp.net 2
(vb), can someone correct my connection syntax. The problem seems to be
that I'm not properly referening the config settings in my aspx page.

Thanks!

Compiler Error Message: BC30456: 'connectionStrings' is not a member of
'Configuration'.

strConnectString = System.configuration.connectionStrings("DRPTWeb")

My web.config file:

<configuration>

<connectionStrings>

<add name="DRPTWeb" connectionString="Data Source=DRPT-DEV01;Initial
Catalog=DRPT....etc....." providerName="System.Data.SqlClient" />

</connectionStrings>




Feb 11 '06 #3
I stand corrected. I'm still use the hash functionality of AppSettings from
1.x.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
strConnectString =
System.Configuration.ConfigurationManager.Connecti onStrings("DRPTWeb").ConnectionString

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:uo*************@TK2MSFTNGP12.phx.gbl...
It should be
System.Configuration.ConfigurationManager.Connecti onStrings("DRPTWeb").
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"D. Shane Fowlkes" <sh**********@h-o-t-m-a-i-l.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
I'm trying out a whole bunch of new (to me) techniques. Using asp.net 2
(vb), can someone correct my connection syntax. The problem seems to
be that I'm not properly referening the config settings in my aspx page.

Thanks!

Compiler Error Message: BC30456: 'connectionStrings' is not a member of
'Configuration'.

strConnectString = System.configuration.connectionStrings("DRPTWeb")

My web.config file:

<configuration>

<connectionStrings>

<add name="DRPTWeb" connectionString="Data Source=DRPT-DEV01;Initial
Catalog=DRPT....etc....." providerName="System.Data.SqlClient" />

</connectionStrings>





Feb 11 '06 #4
Yeah, it's quite easy to forget that when trying v2.0 way.

Teemu

"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I stand corrected. I'm still use the hash functionality of AppSettings
from 1.x.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
strConnectString =
System.Configuration.ConfigurationManager.Connecti onStrings("DRPTWeb").ConnectionString

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:uo*************@TK2MSFTNGP12.phx.gbl...
It should be
System.Configuration.ConfigurationManager.Connecti onStrings("DRPTWeb").
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"D. Shane Fowlkes" <sh**********@h-o-t-m-a-i-l.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
I'm trying out a whole bunch of new (to me) techniques. Using asp.net
2 (vb), can someone correct my connection syntax. The problem seems
to be that I'm not properly referening the config settings in my aspx
page.

Thanks!

Compiler Error Message: BC30456: 'connectionStrings' is not a member of
'Configuration'.

strConnectString = System.configuration.connectionStrings("DRPTWeb")

My web.config file:

<configuration>

<connectionStrings>

<add name="DRPTWeb" connectionString="Data Source=DRPT-DEV01;Initial
Catalog=DRPT....etc....." providerName="System.Data.SqlClient" />

</connectionStrings>





Feb 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: GrantS | last post by:
I am unable to get the connection to work with using the app.config file. the connection works when I use 'in line' connection as below:...
10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
1
by: Samridhi Kumar Shukla | last post by:
I am facing technical difficulti in using server connection control because we cannot change the path once fixed .. one way is to edit the code of the form generated code but though it allow to...
4
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet...
12
by: Charlie | last post by:
Hi: My host will not allow me use a trusted connection or make registry setting, so I'm stuck trying find a way to hide connection string which will be stored in web.config file. If I encrypt...
19
by: Jaime Stuardo | last post by:
Hi all.. I have created a business logic component that is used from my ASP.NET webform. It works, but connection string to the database is hard coded, as in this method : public DataSet...
14
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
8
by: Brett | last post by:
I wrote an ASP.NET application that queries a SQL Server database (on a different box from the web server) and displays the result in a GridView. The datasource for the GridView is a SQLDataSource....
2
by: Johnson | last post by:
I'm trying to fix a "sub optimal" situation with respect to connection string management. Your thoughtful responses will be appreciated. I just started with a new client who has a bunch of legacy...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.