.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 8th, 2002, 07:02 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 23
reading a text file

Originally posted by : Chris James (jameschris@johndeere.com)I am very new to asp and visual basic. All I need to do is read lines from a text file and plug them in as a variable untill the EOF. This should be very simple to do I know, but I am not sure how to get started. here is a sample of the code that I have.XXvar should be the variable.The text file is jsut line by line text ADOCommand.CommandText = ";(rdn=" + XXvar + "));uid,mail,cn;subtree" Set rs = ADOCommand.Execute Do While Not rs.EOF

Reply With Quote
  #2  
Old February 26th, 2002, 11:25 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 23
Originally posted by : Andres Melguizo Velez (lucan@bigfoot.com)Hi, this is just an example: Const ForReading = 1, ForWriting = 2, ForAppending = 8 szFileName = Server.MapPath("./") & "FileToRead.txt" Set fso = Server.CreateObject("Scripting.FileSystemObject") if (fso.FileExists(szFileName)) then Set txtFile = fso.OpenTextFile(szFileName, ForReading, False) szText = txtFile.ReadAll txtFile.Close Set txtFile = Nothing end if Set fso = Nothing ... all the text file contents is into szText variable.I hope this could be useful.I suggest you that you read the documentation FileSystemObject. If you use Norton Antivirus, be sure that ScriptBlocking is not enabled.Bye.------------Chris James at 2/8/2002 4:02:30 PMI am very new to asp and visual basic. All I need to do is read lines from a text file and plug them in as a variable untill the EOF. This should be very simple to do I know, but I am not sure how to get started. here is a sample of the code that I have.XXvar should be the variable.The text file is jsut line by line text ADOCommand.CommandText = ";(rdn=" + XXvar + "));uid,mail,cn;subtree" Set rs = ADOCommand.Execute Do While Not rs.EOF

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > reading a text file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT