Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
olay80
Yak Posting Veteran
62 Posts |
Posted - 2005-04-01 : 06:29:20
|
hey guys,well i'm trying to configure the connectionString so i would get it directly from webConfig file by using the following :/*****<appSettings key = "oliver" value = "workstation id='ttttt';packet size=4096;user id=ffff;data source='192.168.53.96';persist security info=True;initial catalog=sdf;password=hhhh"></appSettings>******/when i go to advance i'm not being able to see the key which is "oliver"what can i do?thanx,Oliver |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2005-04-01 : 07:14:47
|
You want it like this :<appSettings><add key = "oliver"value = "workstation id='ttttt';packet size=4096;user id=ffff;data source='192.168.53.96';persist security info=True;initial catalog=sdf;password=hhhh" /></appSettings>DamianIta erat quando hic adveni. |
 |
|
olay80
Yak Posting Veteran
62 Posts |
Posted - 2005-04-01 : 09:22:52
|
hey Damian,i fixed it but it's still not showing.Oliver |
 |
|
iamsunil
Starting Member
2 Posts |
Posted - 2005-04-01 : 16:55:35
|
To read a key from web.config file - ConfigurationSettings.AppSettings.Get ("Oliver")should give you the desired value.Hope it helps.Sunil |
 |
|
olay80
Yak Posting Veteran
62 Posts |
Posted - 2005-04-03 : 06:35:48
|
Sunil,i haven't tried it using code because i want to define it on the design time - after dragging the connection to the design page i go to it's properties and go to advanced connection and setup the key there by selecting it from a dropdown list, but the problem is that it's not showing in the dropdown knowing that i put the right code in <configuration> in webConfig file.thanx,Oliver |
 |
|
olay80
Yak Posting Veteran
62 Posts |
Posted - 2005-04-04 : 03:16:10
|
thanx guys it seems i needed to select a connection.ConnString that already exists and then the conn that i defined shows it seems as it refreshes...Oliver |
 |
|
|
|
|