can use the following code dim sr as streamreader dim input as string dim found as boolean
sr=new streamreader("path to file")
found=false
while not sr.EOF
input=sr.readline
if instr(input, "no records found")>0 then
found=true
end if
wend
if found=true then
'process file
end if
That's off the top of my head, so may need some tweaking to be correct.
^^^^^^^^^^^^^^^^^^^^^^^
James Walker
Systems Analyst
Mercy Medical Center
Knoxville, TN
Office (865)647-2906
Mobile (865)323-7378
Fax (865)545-3007
^^^^^^^^^^^^^^^^^^^^^^^
[email protected]
04/22/2011 05:40 PM
Please respond to
[email protected]
To
[email protected]
cc
Subject
[talkbws] StreamReader
Is anyone really familiar with streamreader ? I would like to see if a txt
file contains ?no records found? before I process it ?
Scott Ahlbrandt MCSA
Patient Accounting Systems Analyst
John C. Lincoln Health Network
2500 West Utopia Road
Phoenix, Arizona 85027
Fax: 623-434-6216
Phone:623-434-6200 x301286
http://www.jcl.com
--- To post a message to this list, send mail to: [email protected] You
are currently subscribed as: [email protected] Unsubscribe in the
customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx
CONFIDENTIALITY NOTICE: This message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution
is prohibited. If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.
--- To post a message to this list, send mail to: [email protected] You are
currently subscribed as: [email protected] Unsubscribe in the
customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx <<image/gif>>
