×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Below code is placed in menu.when I

Below code is placed in menu.when I

Below code is placed in menu.when I

(OP)
Below code is placed in menu.when I run application we have an option to open table from menu in which we can view & edit records.For first time table is opening fine and it is working.we also perform other task by using this table
in different forms.But when we again try to open same table,an error"File Access Denied" occurs.Can u provide me a solution






ON ERROR DO errhand2 WITH ;
   ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
CLOSE DATABASES
OPEN DATABASE (home(2)+'data1')
USE mode
BROWSE FIELDS mode NODELETE valid :F !EMPTY(mode) ERROR MESSAGEBOX('Enter Some value')

PROCEDURE errhand2
PARAMETER merror, mess, mess1, mprog, mlineno
CLEAR
messagebox('Error number: ' + LTRIM(STR(merror)))
messagebox('Error message: ' + mess)
messagebox('Line of code with error: ' + mess1)
messagebox('Line number of error: ' + LTRIM(STR(mlineno)))
messagebox('Program with error: ' + mprog)
endproc

RE: Below code is placed in menu.when I

You have probably opened the table exclusively.

You should either open all tables shared

USE myTable IN 0 SHARED

or issue SET EXCLUSIVE OFF at the start of your program and when you issue:

USE myTable IN 0 it will be opened shared by default.

HTH,

Weedz (Wietze Veld)
My private project:www.crowncap.demon.nl\info\crwnbase
Download the CrownBase source code !!

RE: Below code is placed in menu.when I

Hi
In Addition to what WEEDZ mentioned...

If the code is refined.. as given below... it could help
**********************************************
ON ERROR DO errhand2 WITH ;
   ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
CLOSE DATABASES
OPEN DATABASE (home(2)+'data1')

SELECT 0
USE mode AGAIN SHARED
BROWSE FIELDS mode NODELETE valid :F !EMPTY(mode) ERROR MESSAGEBOX('Enter Some value')

USE

PROCEDURE errhand2
PARAMETER merror, mess, mess1, mprog, mlineno
CLEAR
messagebox('Error number: ' + LTRIM(STR(merror)))
messagebox('Error message: ' + mess)
messagebox('Line of code with error: ' + mess1)
messagebox('Line number of error: ' + LTRIM(STR(mlineno)))
messagebox('Program with error: ' + mprog)
endproc
***********************************
Also  I suggest you dont use file names with protected words or like words which could confuse you or the programe on a later date. MODE is a common coputer word used for manyting. Using it as a file name will lead to confusion.
Example....
SELECT * FROM file ;
   GROUP BY group ;
   ORDER by order ... etc... where 'file' is the data file, group, order are fields in that...

Hope this helps

ramani
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close