Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Modifying a text file on the server.

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,61868
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Modifying a text file on the server.
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Modifying a text file on the server. - 6/25/2008 3:55:42 PM   
  mmcled

 

Posts: 2
Score: 0
Joined: 6/25/2008
Status: offline
Hi,

i am working on a project where i parse data from a MYSQL DB residing on a web server then write this data into an XML file on the server then use this XML file to create reports/Charts.

I had everything working on my local machine, but when i uploaded the files to the server the XML file wouldn't get updated.

i did use a combination of VBscript and Javascript.

Vbscript to create the file using the following:

   Set objFSO = CreateObject("Scripting.FileSystemObject")
  Set objLogFile = objFSO.CreateTextFile(server.mpapath(".") & "\data.xml", ForWriting, True)
  
  Then used a loop to write data into the objLogFIle etc...


and Javascripts in another HTML page to load the data into a report.

Can anyone help? how to use VBscript to write/modify a text  file on the server side? the code above is good only for client side... :)

Thanks,
mmcled
 
 
Post #: 1
 
 RE: Modifying a text file on the server. - 6/26/2008 12:25:59 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
My first guess would be an IIS permissions issue.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mmcled)
 
 
Post #: 2
 
 RE: Modifying a text file on the server. - 6/26/2008 3:12:15 AM   
  mmcled

 

Posts: 2
Score: 0
Joined: 6/25/2008
Status: offline
Thank you for the reply, but the think is, we are not using  IIS or apache servers, but something created by National Instrument called G Web Server, and that is why I am limited to VB and Java scripts and maybe CGI. No ASP no PHP. :)



Any other ideas?

Thx

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Modifying a text file on the server. - 6/26/2008 5:22:32 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
This:

server.mpapath


means that you are using some server to host your script. That is what you need to have permissioned correctly.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mmcled)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Modifying a text file on the server. Page: [1]
Jump to:





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