473,569 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To Continuosly Read Text File In Vb

1 New Member
Hi...
I M Working On Project "web-based Wireless Home Automation"
My Hardware Part Is Completed ..n Now I Want To Access This Hardware Using Parallel Port...so I Choose Vb..bcoz C Program Doesnt Support On Xp.
In My Project Asp.net Is Generating One Text File Having Data 1 Or 0. N I Want That Vb Program Should Read The Content Of This File Contineously And Give Info Or Access To Parallel Port...should It Be Possible????
If Yes So Plz Help Me..as Early As Possible
Apr 8 '07 #1
1 1730
Killer42
8,435 Recognized Expert Expert
Hi...
I M Working On Project "web-based Wireless Home Automation"
My Hardware Part Is Completed ..n Now I Want To Access This Hardware Using Parallel Port...so I Choose Vb..bcoz C Program Doesnt Support On Xp.
In My Project Asp.net Is Generating One Text File Having Data 1 Or 0. N I Want That Vb Program Should Read The Content Of This File Contineously And Give Info Or Access To Parallel Port...should It Be Possible????
If Yes So Plz Help Me..as Early As Possible
Yes, reading a file "continuous ly" should be very simple. Just open the file, read it, close it, open it, and read it again. And keep doing so.

Probably the simplest thing to do would be to set up a timer control to do this process as often as you want.

Important point, though - I'm almost certain that if you want to see new data added to the file, you have to close it and open it again.
Apr 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2653
by: John Flynn | last post by:
hi, having problems reading from and writing back to the same file. basically, i want to read lines of text from a file and reverse them and write them back to the same file.. it has to replace the text its reversing eg.
1
4295
by: Magix | last post by:
Hi, I have these string data: str_data1, str_data2, str_data3, which capture some value after a routine process A. Then I would like to write (append) these 3 string values into a text file each time after routine process A, the text file is named "mytext.dat" in following format with "#####" as separator. The maximum entries of them is...
8
7246
by: james | last post by:
I am trying to use Filestream to read a file ( .DAT) that contains values in HEX that I want to convert to text. I know the different offset addresses for each portion of the data I am trying to retrieve. But, I am having problems actually reading the data for the number of Bytes that I need to get from each address. Here is some of the code I...
35
11385
by: RyanS09 | last post by:
Hello- I am trying to write a snippet which will open a text file with an integer on each line. I would like to read the last integer in the file. I am currently using: file = fopen("f.txt", "r+"); fseek(file, -2, SEEK_END); fscanf(file, "%d", &c); this works fine if the integer is only a single character. When I get into larger...
3
18956
by: nicolasg | last post by:
Hi, I'm trying to open a file (any file) in binary mode and save it inside a new text file. After that I want to read the source from the text file and save it back to the disk with its original form. The problem is tha the binary source that I extract from the text file seems to be diferent from the source I saved. Here is my code: 1)...
3
2931
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
I try to follow Steve's paper to build a database, and store a small text file into SQL Server database and retrieve it later. Only difference between my table and Steve's table is that I use NTEXT datatype for the file instead of using IMAGE datatype. I can not use SqlDataReader to read the data. I need your help, Thanks. -David (1) I...
3
1798
by: Ray | last post by:
Hello World, I made a Windowsform that reads data from a CSV file. It works fine, but when I have read the data of a record I have to re-Debug the form to read another record. So when I put a new seek item in the textbox after I searched for an item and click the seek button.. it seems it is doing nothing. And also... what code can I use...
6
32852
by: Thomas Kowalski | last post by:
Hi, currently I am reading a huge (about 10-100 MB) text-file line by line using fstreams and getline. I wonder whether there is a faster way to read a file line by line (with std::string line). Is there some way to burst read the whole file and later "extract" each line? Thanks in advance, Thomas Kowalski
1
925
by: inlovewithmusic | last post by:
Hello, I am trying to write a program that will fetch the amount of memory used by a process on a pc and write it to a text file. I have done this with the help of the System.Diagnostics library, the problem is that I want the program to execute continuously (it should not stop). What is the best way that this can be done ?. I have already...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.