Server.CreateObject

Results 1 to 4 of 4

Thread: Server.CreateObject

  1. #1
    Ian Hoppes Guest

    Default Server.CreateObject

    When Server.CreateObject is used, does that object then need to be closed when finished to free up server resources? and if so, how do you do it? ive created a file system object using: Server.CreateObject("Scripting.FileSystemObject"). <BR><BR>ian hoppes<BR>ian@shelby.net

  2. #2
    Brad Foust Guest

    Default RE: Server.CreateObject

    Check out this article:<BR><BR>http://www.learnasp.com/learn/cleanup.asp<BR><BR>That should provide you with some direction.<BR><BR>good luck!<BR>--brad

  3. #3
    Join Date
    Dec 1969
    Posts
    118

    Default RE: Server.CreateObject

    I recently downloaded the bannner as tracking system which uses 3 file files. the banners.asp is used as an .include. I changed the const.&#039path. to my dir. settings and created the banners.txt file and another page called showbanner.asp to display the ad. and the two sub dirs for creating the counts and clickthrus. fine, the createobject(filescripting etc. worked and read the banners.txt and displayed the ad. but when the code got to an if clause to createtextfile for the clicks dir. i got the cannot createobject, why?

  4. #4
    webmaster@ughh.com Guest

    Default RE: Server.CreateObject

    This comes from a reply I received from Scott Mitchell and it works!:<BR>This is likely caused because you are using vbCrLf and not chr(10) as the<BR>delimiters in your banner.txt file. In banner.asp<BR>(http://www.4guysfromrolla.com/webtech/code/ad/banner.txt), where it reads:<BR><BR>if right(records(i),1) = chr(10) then<BR>records(i) = left(records(i), len(records(i)) - 1)<BR>end if<BR>if left(records(i),1) = chr(10) then<BR>records(i) = right(records(i), len(records(i)) - 1)<BR>end if<BR><BR>replace the chr(10) with vbCrLf (and replace the chr(10) with vbCrLf throughout this page)<BR><BR>That should do the trick...<BR><BR>Scott Mitchell


Posting Permissions

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