'NOT A TABLE' error message 
Author Message
 'NOT A TABLE' error message

Hi, can any1 help me with this? Its very weird, I have a table which is
accessed whenever a user logs on to my program. Its purpose is to store the
username of the last person who logged on, then that username is displayed
automatically during the next log on.
It works perfectly most of the time, but every now and then the table seems
to get corrupted and i get a message 'NOT A TABLE'.
To get around this i simply delete the table and it is created again
automatically the next time someone logs in.
I havent been able to determine a common factor associated with this other
than the fact that it seems to happen on average once a week.

Your help is as always very appreciated

John

***this code is run at the start of log in***
IF FILE(SYS(5)+'\lastlogin.dbf')
   use SYS(5)+'\lastlogin' exclusive IN 0
   select lastlogin
   username3=ALLTRIM(lastlogin.userlist)
   use
ELSE
   username3=username
ENDIF

***this code is run at the end of log in***
SET SAFETY off
SELECT * from login;
  WHERE
alltrim(upper(LOGIN.USERLIST))==alltrim(upper(thisform.TEXT1.value));
  INTO TABLE SYS(5)+'\lastlogin'
SET SAFETY on



Tue, 13 Jul 2004 18:10:54 GMT  
 'NOT A TABLE' error message
Sounds like sometimes your systems crashes at that point and corrupts the
table. You may want to consider (as I did) to record the users and their
actions in a text file, by using low level functions like FOPEN() etc...


Quote:
> Hi, can any1 help me with this? Its very weird, I have a table which is
> accessed whenever a user logs on to my program. Its purpose is to store
the
> username of the last person who logged on, then that username is displayed
> automatically during the next log on.
> It works perfectly most of the time, but every now and then the table
seems
> to get corrupted and i get a message 'NOT A TABLE'.
> To get around this i simply delete the table and it is created again
> automatically the next time someone logs in.
> I havent been able to determine a common factor associated with this other
> than the fact that it seems to happen on average once a week.

> Your help is as always very appreciated

> John

> ***this code is run at the start of log in***
> IF FILE(SYS(5)+'\lastlogin.dbf')
>    use SYS(5)+'\lastlogin' exclusive IN 0
>    select lastlogin
>    username3=ALLTRIM(lastlogin.userlist)
>    use
> ELSE
>    username3=username
> ENDIF

> ***this code is run at the end of log in***
> SET SAFETY off
> SELECT * from login;
>   WHERE
> alltrim(upper(LOGIN.USERLIST))==alltrim(upper(thisform.TEXT1.value));
>   INTO TABLE SYS(5)+'\lastlogin'
> SET SAFETY on



Tue, 13 Jul 2004 18:48:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. 'not an array' error message

2. 'File Does Not Exist' error message

3. 'Continue without Locate' error message

4. Error message 'Invalid Seek Offset'

5. alias 'table' is not found

6. VFP 'Not an object file' errors

7. 'Not a character expression 'error

8. 'File Not Open' error

9. 'Cannot access the selected table' error

10. VFP Can't start - not enough memory message

11. Error 1495 - keyfield not unique doesn't fire ON ERROR

12. stop 'printing report' message

 

 
Powered by phpBB® Forum Software