English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I create a Asp page which gets the username and password form the Login page. And also it get the DB server, UserId and Password. I need to use a single Connection String (i..e ) i have to Set Connection String in Configration section of Web.Config file.How i Set this Dyanamic Connection in asp.net Web.config file.Please help..I am using Orcle DB.

2006-09-11 20:46:17 · 2 answers · asked by mani m 1 in Computers & Internet Programming & Design

2 answers

I agree with Helmut, you will need to do something like this"

public function ConnectionString(User as string, Pwd as string) as string

return string.format("Server=.;Database=MyDB;User Id={0};Password={1};", User, Pwd)

end function

2006-09-12 05:55:39 · answer #1 · answered by Chris Love 1 · 0 0

When you get the UserID and the passwort from the login page you can not use a config file, or you had to recreate the config file everytime. So, just assemble the connection string after your login page and assign it to a global variable.

Helmut

2006-09-12 00:51:13 · answer #2 · answered by hswes 2 · 0 0

fedest.com, questions and answers