473,806 Members | 2,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access() doesn't work when a file is open

Hi:

I am facing a strange problem.

I have opened a file "File1" using fopen() and while processing the
records in the file in a loop, I have a call to access() to check
existence of "File2". The reason is to stop processing further records
when the file "File2" exists. But the access() call fails when the file
"File1" is open.

If I close "File1" before making a call to access() on "File2", then it
works. Why is this behavior?

Please help. And please excuse my C ignorance.

Regds..Shyam

Nov 15 '05
16 1313

CBFalconer wrote:
Suman wrote:
[...]
Did you check for the error? aceess() on failure should set errno.
See if you can find out something. Guessing won't take us any
further.

[...]
Please do not answer off-topic enquiries, other than to suggest an
appropriate newsgroup. One reason is that there is nobody here (in
principle) to criticize an off-topic reply content. Another is
that it clutters the newsgroup.


It was my own way of saying, do the needful before posting, and also
an attempt to make the OP come back with *some* C code. Being rude
and showing him the door, was a possibility, but I did flirt a little
with rules, I suppose.

`fopen()': I believe is on-topic -- thence the gaul to take
such latitude.

Sometimes, the line is far too thin. For me.

Nov 15 '05 #11
ps**********@ya hoo.com wrote:

access() is an api available on Unix to determine accessibility of a
file. It is on all standard Unix flavors.


I don't think you will go far. I gave you explicit instructions
about how to compose a reply in google groups, and you ignored them
and everything else I told you. This shows either an appalling
inability to learn or insufferable rudeness.

--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson

Nov 15 '05 #12
In article <43************ ***@yahoo.com>,
CBFalconer <cb********@wor ldnet.att.net> wrote:
ps**********@y ahoo.com wrote:

access() is an api available on Unix to determine accessibility of a
file. It is on all standard Unix flavors.


I don't think you will go far. I gave you explicit instructions
about how to compose a reply in google groups, and you ignored them
and everything else I told you. This shows either an appalling
inability to learn or insufferable rudeness.


Or, ...

It shows that he just don't kowtow to you!

(And, why should he?)

Nov 15 '05 #13
Suman wrote:
CBFalconer wrote:
Suman wrote:
[...]
Did you check for the error? aceess() on failure should set errno. ^^^^^^^^
As far as I can see the above says access() NOT fopen()
See if you can find out something. Guessing won't take us any
further.
[...]
Please do not answer off-topic enquiries, other than to suggest an
appropriate newsgroup. One reason is that there is nobody here (in
principle) to criticize an off-topic reply content. Another is
that it clutters the newsgroup.


It was my own way of saying, do the needful before posting, and also
an attempt to make the OP come back with *some* C code.


When the problem, as in the OPs case, is a function that is OFF TOPIC
getting them to post it here is not appropriate.

If the OP can demonstrate a problem with only standard C functions then
*that* would have been on topic.
Being rude
and showing him the door, was a possibility,
Others redirected the OP moderately politely to other groups. Pointing
the OP at where the
but I did flirt a little
with rules, I suppose.
No, you talked about something completely off topic, namely access().
`fopen()': I believe is on-topic -- thence the gaul to take
such latitude.
The problem was access() failing, NOT fopen() failing, and your answer
was talking purely about access() NOT fopen().
Sometimes, the line is far too thin. For me.


I would have said it was rather obvious that if your answer is just
talking about a function outside the scope of this group, namely the
behaviour of access() in this case, that is was off topic.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #14
In article <hj************ @brenda.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:
(Blah, blah, blah, the typical verbal venting that passes for Flash's sex
life...)
(leading to...)
Sometimes, the line is far too thin. For me.


I would have said it was rather obvious that if your answer is just
talking about a function outside the scope of this group, namely the
behaviour of access() in this case, that is was off topic.


So, be a man! Do what Americans do! Sue him!

(Don't take being off-topic into your own hands. Take him to court!!!)

See ya in court!

Nov 15 '05 #15
Suman wrote:
gaul


ITYM gall

http://www.m-w.com/cgi-bin/dictionar...ionary&va=gall

2 : brazen boldness coupled with impudent assurance and insolence

--
pete
Nov 15 '05 #16

pete wrote:
Suman wrote:
gaul


ITYM gall


Trust me, it was a typoe!

Nov 15 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
2911
by: chicha | last post by:
Hey people, I have to convert MS Access 2000 database into mysql database, the whole thing being part of this project I'm doing for one of my faculty classes. My professor somehow presumed I knew db's and gave me long list of things to do with that particular database, first thing being that particular conversion. Truth is that I don't know a first thing about db's, let alone using mysql... I downloaded mysql form www.mysql.com and...
6
4766
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
4
3541
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the application initially. I have VS 2002, Windows XP, Access XP(2000 format). He is my problem....
1
650
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the application initially. I have VS 2002, Windows XP, Access XP(2000 format). He is my problem....
17
2501
by: DaveG | last post by:
Hi all I am planning on writing a stock and accounts program for the family business, I understand this is likely to take close to 2 years to accomplish. The stock is likely to run into over a thousand items and the accounting side will be used for hopefully many years so the entries are likely to be vast. The delema is what is best to use ase the DB engine, Access I have as part of Office 2002 or should I really be looking at SQL...
9
3848
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
18
9159
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft page "How to: Connect to Data in an Access Database"
4
2597
by: Bugs | last post by:
Hi everyone. I am trying to open a database which works fine using Access 2003, but when trying to open it on another PC that has Access 2002 I get the following error "This database is unrecognised file format, it may have been created with a later version of Access, upgrade to a later version..." Could anyone please help to resolve this issue.
5
2237
by: novak | last post by:
hi list, since a couple of weeks we face a special "security" problem. neraly every ms-access database that is located on our net-drives cannot be opened. when clicking the document's icon, first, the warning message arises "open document - security message" - "Really open *.mdb ....?", second, when clicking "start" ms-access starts, but the mdb-file cannot be opened. message: "ms-access could not open the file ... The
9
2428
by: O | last post by:
I need to do some lookups and updates on some legacy Access 2.0 files (they've from another vendor and I'm not in a position to update them). I was successful using VB6, but I've moved on to VS 2005 and ADO and having some serious problems. Here's the scenario: 2 people have the same Access 2.0 databases running in the Access 2.0 application.
0
10624
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3853
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.