Server.MapPath in Connection String

Results 1 to 2 of 2

Thread: Server.MapPath in Connection String

  1. #1
    Join Date
    Dec 1969

    Default Server.MapPath in Connection String

    I&#039;ve heard that if I hardcode the physical path to the database in the connection string instead of using Server.MapPath() on the virtual path each time that it can be more efficient. This is bacause a call to the Server Variables is relatively expensive.<BR><BR>So my question is would I still realize a slight benefit even if I already user Server Variables elsewhere on my pages such as to check the referrer?<BR><BR>Thanx,<BR>-Paul<BR><BR> - Web Database Developer<BR><BR>Developer Quick Tips Page<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Server.MapPath in Connection String

    Once you request one server variable, you&#039;ve requested them all underneath the sheets. You&#039;re safe to use it on the same page.

Posting Permissions

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