|
| |
|
|
raygberg
Posts: 2 Joined: 8/30/2004 Status: offline
|
"#include" files and global.asa - 8/31/2004 11:15:18
Here is a very basic question. I've seen conflicting info on whether "#include" commands can be put in global.asa. I need to know for an application I am working on. Can you use the "#include" command in global.asa? Thanks for any replies! Ray Greenberg
|
|
|
|
raygberg
Posts: 2 Joined: 8/30/2004 Status: offline
|
RE: "#include" files and global.asa - 9/1/2004 13:59:15
quote:
ORIGINAL: Spooky What are you trying to include? SSI are most useful at page level - the global.asa file should only contain application specific programing I am trying to include an ASP connection string to a SQL Server table. In my application, I have all of my SQL connection strings in #include files, because they contain passwords and I want to separate any strings containing passwords from the main ASP code. The #include file would contain the following: <% Set objODB = Server.CreateObject("ADODB.Connection") objODB.Open "DSN=dsnname;uid=userid;PWD=password;database=dbname" %> The reason I am trying to do this is that I don't want to explicitly put a password in the global.asa file due to security concerns. By way of explanation, what I am trying to do is use the Session_OnEnd subroutine of global.asa as part of a process to track whether users are logged into my application. Each registered user has his/her own SQL record, with a field called "LoggedIn". When each user logs in, the "LoggedIn" field will be set to a value. What I am trying to do is, on session abandonment or expiration, have the Session_OnEnd subroutine in global.asa access the user's SQL record and reset the "LoggedIn" field to null to indicate that the user has logged off. To do this, I must open the SQL database and access the table of user records from the global.asa file. I know that this is a simplistic way of tracking user logins, but I am somewhat of a newbie at advanced ASP programming and this was the best solution I could come up with in the limited time available to me. Thanks in advance for any replies/suggestions. Ray Greenberg
|
|
|
|
cemeesti
Posts: 1 Joined: 10/4/2004 Status: offline
|
RE: "#include" files and global.asa - 10/4/2004 4:31:01
here is the very basic answer to your question: <script language="vbscript" runat="server" src="include/yourfile.asp"></script> have fun with that new include method
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|