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
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