If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > problems with #include file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-12-04, 09:07
crichardson crichardson is offline
Registered User
 
Join Date: Nov 2002
Posts: 71
problems with #include file

I have a common requirement to strip out header stuff from a set of ASP files.


<!--#include file="header.asp"-->


However, as soon as I include the header in the above way, I always get
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/content.asp, line 27

The line number shows that it's complaining about a stored procedure call that appears immediately after the included header:-

rs.open "Exec spAStoredProc", cn

However, if I copy back the contents of the Header.asp back into the main content.asp it all works again.

Any suggstions?

Clive
Reply With Quote
  #2 (permalink)  
Old 02-12-04, 11:43
crichardson crichardson is offline
Registered User
 
Join Date: Nov 2002
Posts: 71
Re: problems with #include file

Quote:
Originally posted by crichardson
I have a common requirement to strip out header stuff from a set of ASP files.


<!--#include file="header.asp"-->


However, as soon as I include the header in the above way, I always get
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/content.asp, line 27

The line number shows that it's complaining about a stored procedure call that appears immediately after the included header:-

rs.open "Exec spAStoredProc", cn

However, if I copy back the contents of the Header.asp back into the main content.asp it all works again.

Any suggstions?

Clive
Reply With Quote
  #3 (permalink)  
Old 02-12-04, 11:47
crichardson crichardson is offline
Registered User
 
Join Date: Nov 2002
Posts: 71
Re: problems with #include file

I'm still interested in getting some advice on this. To add a little more information, it seems that as soon as I use the include file, all rs.open operations fail in both the Header.asp and main asp page as well.

Clive
Reply With Quote
  #4 (permalink)  
Old 02-12-04, 12:22
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
can you post the code for both connections in include and main files?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On