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.

 All Forums
 Development Tools
 ASP.NET
 connection ?

Author  Topic 

jhermiz

3564 Posts

Posted - 2004-08-28 : 15:04:23
I am new to ASP.net.

I want to develop a system to connect to a sql server 2k database.
Where do I store connection string information ?

Meaning I want to be able to connect to my db when I need to, how should I store the connection string?

Thanks,
Jon


Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-28 : 15:21:15
well i store it in web.config file in appname.web project

there is of course a minimal three-tier layer model in use (gui -> business logic -> db read/write)

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

jhermiz

3564 Posts

Posted - 2004-08-28 : 15:29:19
quote:
Originally posted by spirit1

well i store it in web.config file in appname.web project

there is of course a minimal three-tier layer model in use (gui -> business logic -> db read/write)

Go with the flow & have fun! Else fight the flow :)



Ok I have not installed or purchased visual studio .net. Will this web.config file be found when I use this ?

I am assuming each new ASP.net project has one of these files ?

Thanks,
Jon


Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-28 : 15:33:34
no not every project. only the AppName.Web project thich is a startup project for your app.
it is basically an xml file that you can read from anywhere.

it is automatically created when you make a project.

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

jhermiz

3564 Posts

Posted - 2004-08-28 : 15:40:16
quote:
Originally posted by spirit1

no not every project. only the AppName.Web project thich is a startup project for your app.
it is basically an xml file that you can read from anywhere.

it is automatically created when you make a project.

Go with the flow & have fun! Else fight the flow :)



Automatically created when you make a project?? So each project I make this file is available right?



Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-28 : 15:50:15
ok i should say created when you make a AppName.Web project.
it is only in one project -> .web

ok maybe i should clear something up:
in .net you have a solution to which you add projects.
usually i have a minimum of three projects:
AppNameDb - db access
AppNameBL - business logic
AppName.Web - GUI - default project created when you choose to make an asp.net app


Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

jhermiz

3564 Posts

Posted - 2004-08-28 : 16:00:45
Ok that makes sense, these are all projects like in VB that you wrap up into one overall large project. So in your case you have chosen a three-tier approach with your UI, the Business Logic, and your Web Database access as your three projects. This XML file resides in the default directory or project that is initially created.

Thanks for the help.

BTW: what is your Yahoo screen name? Is it possible to add you for future reference. I tried contacting you by clicking the Yahoo Y on this site but it doesn't seem to want to work.

Thanks again spirit

Jon


Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-28 : 16:03:42
my yahoo name is: spirit1_fe
that of course translates to spirit1_fe@yahoo.com for e-mail :)

add on :)

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page
   

- Advertisement -