-
Oct 12th, 2003, 11:24 PM
#1
Thread Starter
PowerPoster
Simple question
Where should I declare global const in ASP?
Let said, I have a const Const DbSvrName = "localhost" in each ASP page. and I take a long time to change each when I change the database server IP.
Therefore, where should I declare this constant. So it can access by each ASP page.
regards,
-
Oct 12th, 2003, 11:29 PM
#2
Frenzied Member
set it in the global.asa file.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Oct 13th, 2003, 12:52 AM
#3
Thread Starter
PowerPoster
-
Oct 13th, 2003, 10:27 AM
#4
Frenzied Member
Or keep it in include file.
anypage.asp
Code:
<html>
<head></head>
<!--#include file="hostname.inc"-->
<body>
....
....
hostname.inc
Code:
<%
Const DbSvrName = "localhost"
%>
-
Oct 13th, 2003, 07:59 PM
#5
Thread Starter
PowerPoster
Memnoch1207: It working fine in my development pc (localhost), but when I upload to the webhosting server, it doesn't work. It is require any special setting on the server side?
andreys: Will try your suggestion.
regards,
-
Oct 14th, 2003, 12:03 AM
#6
Thread Starter
PowerPoster
andreys : the include method working in both the web server and my loacal development machine.
Thanks both you guys
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|