473,587 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading a log from sensor

7 New Member
Hello forum,
I am working with a watchport Proximity sensor.
This sensor will logs an event, like ON or OFF into a text file which is on my application directory.
When it is ON i have to do something and OFF some otherthing.
While I am reading from that text file, I am getting an exception stating that
"The file cannnot be accessed since it is using by some other process."
Can any body help to solve this,
And also do any body worked on Sensors, please let me know as the requirement is urgent. please..
Sep 17 '07 #1
2 843
TRScheel
638 Recognized Expert Contributor
A read request should go through just fine even if another process is writing to it, perhaps you are requesting write permission?

Also, try copying the file, then reading the copy.
Sep 17 '07 #2
Plater
7,872 Recognized Expert Expert
A read request should go through just fine even if another process is writing to it, perhaps you are requesting write permission?

Also, try copying the file, then reading the copy.
You can open files with read-locks as well, not sure how well its implemented as I've never had a use for it, but it's possible the file gets fully locked while another program has it open?
Sep 18 '07 #3

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

Similar topics

29
2703
by: VooDoo | last post by:
Hi, I have a Temperature sensor with internal web server that provide the data in a text format. When quering the ip(ttp://192.168.10.220/temp) of the sensor i get that kind of reply: Probe 1|82.2|Probe 2|80.8|Probe 3|-99.9|Probe 4|-99.9 I woud like to import the result into my mysql database. What is the best way to do this? Should i use...
5
1624
by: Richard Follet | last post by:
Hi, I must read an HTML-free web page. The only documentation I have is this : : temp: This request will return an HTML-free web page, consisting of a simple ASCII string of pipe-delimited data. The data will be in the format of : "PROBE1_NAME|TEMP|PROBE2_NAME|TEMP…"
2
2461
by: Laban | last post by:
Does anyone know how I can fetch a trigger/break signal via the serial-port? I have a circuit that connects two pins on the serial-port when the sensor is activated (when a person stands infront of the photocell). How can I get this to interact with my Java code? Or is there a better alternative then the com-port? I want a piece of...
20
2158
by: Levi Campbell | last post by:
Hi, I'm working on a random number generator using the internet as a way to gather entropy, I have two questions. 1. is there a way to capture the internet stream? 2. how would I skip every 2nd, 3rd, or 4th byte to protect privacy?
6
12279
by: Martin Adhie | last post by:
Hi Guys, I start to learn C++, because I got win API which interating with Fingerprint reader from Authentec, it comes with SDK and program samples. I just want to create application where by scan fingerprint and directly recorded in the database SQL Server. Does anyone able to assist me on this, I'll very much appreciate. Best...
1
1972
by: Shakira | last post by:
Hey... I am getting readings sent from a temperature sensor every second and want to know how to create a small database that continuosly updates the values and stores all the readings for future reference, with the headings:date,time,temperature and relative humidity. Thanks...
0
1541
reddyprasanth
by: reddyprasanth | last post by:
Hi All, I am Doing a project to design an Electronic Voting System. All The Modules are finished and its working fine. Now i want to implement Finger print Sensor For the voting system.I am using Thinnig,Miniature Algorithms.Can any one help me regarding how to implement it Using Rs232 Port. Can any one help me regarding how to Code for ...
1
1453
by: chmdamodar | last post by:
Hi, Do anybody have the "digi watchport/P sensor" API, if so, please let me know, as I am struggling for the last week and still contiuniung..
1
1786
by: stoui | last post by:
Hi i`m new to the forum and i need some help regarding a project. I have some wireless motion sensors with usb receiver. I want to design a Visual Basic program (just a room) that when a sensor "catches" something then my VB program blink or indicate the position in the room. How can i include the information that i get from the sensor via the...
0
7923
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
8216
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
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6629
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
3845
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
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
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
0
1192
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.