Results 1 to 2 of 2

Thread: connections

  1. #1
    Join Date
    Dec 1969

    Default connections

    Hi,<BR>I am learning .net, and I noticed on the QuickStart tutorials (the E-Commerce Storefront example), a seperate database connection is created inside each function. Should you always create a new db connection? Seems a little repetative to me. In my classic asp scripts, I created one connection and everything used that one connection. Also, if I am creating a new connection everytime, how do I keep my connection string hidden? I don&#039;t want to expose it, since it has user/pass info. <BR><BR>Thanks - Trevor

  2. #2
    Join Date
    Dec 1969

    Default RE: connections

    A db conn. inside every fn......then its not .net!!!!!!!<BR>here a dbconn namespace is created once...which holds all the conn. details.Whenever the db has to be contacted the db conn. namespace is imported...and its function is utilised to lauch the connection.<BR><BR>Hope it helps.<BR><BR>nagarajan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts