Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

app.config connection string wont show for datasets

Status
Not open for further replies.

blar9

Programmer
Mar 12, 2007
39
US
Hey guys I have been a web dev for a long time and I use the web.config to store conection strings that I use throughout the application. Now I am building a desktop app and I am trying to use app.config in the same way but when I create a new dataset it does not show any of my connection strings any ideas?

app.config - basically what I have
<configuration>
<connectionStrings>
<add name="Test" connectionString="fdsfasfsd" ProviderName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>

THANKS!
 
I think you want to store it in you Settings file.

Then to get to it you do something like this:

Code:
Dim set As New MyProject.Properties.Settings() 

Dim connstr as String

connstr = ss.ConnectionStringPropertyName

Hope it helps,

Alex

[small]----signature below----[/small]
I'm pushing an elephant up the stairs

My Crummy Web Page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top