Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE in SELECT
Message
From
16/12/2020 00:38:53
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
15/12/2020 14:25:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01677587
Message ID:
01677599
Views:
66
Hi Tore,

The Database and there tables are created very short before by the very program. The tester does not run a second process. I have a printout of all used datasessions and work areas.
There was a failure in the original message
myTable is non exclusive open in a different datasession
The datasession where I like to open the table has no open cursor.
snippet out of the error log
Fehler #   :      3
Meldung    :      Datei wird bereits verwendet.
Zeile #    :      18
Methode    :      p_appl.putuserlog
Programm   :      8;jvp_meta_xl.vct:p_appl.putuserlog,18-> USE SystemSetting IN SELECT('SystemSetting')
Code       :      
.F.
Klasse des Objektes mit Fehler:               jss_schweisser::P_appl
Datenbanken:      
C:\PROGRAMDATA\JVP\JSS_SCHWEISSER\DATA\TEST2\TEST2.DBC

Aufrufliste:      
  8;jvp_meta_xl.vct:p_appl.putuserlog,18-> USE SystemSetting IN SELECT('SystemSetting')
  7;jvp_meta_xl.vct:p_appl.aftersharedopen,47-> .PutUserLog()
  6;jvp_classes.vct:p_appl.open_db,890
  5;jvp_meta_xl.vct:p_appl.re_open_db,5->lvReturn = THIS.Open_DB(THIS.raDatabase_Settings(1,1),False,'',THIS.raDatabase_Settings(2,1))
  4;jvp_datastruct.vct:p_appl.database_init,254->   .Re_Open_DB()
  3;main_schweisser.mpx,main_schweisser.mpr:ON... ,205
  2;jvp_classes.vct:p_appl.runapplication,9-> READ EVENTS
  1;jss_schweisser.exe,main.prg:main,430

Offene Cursor:



  Standard data session                                        1
  Transaction Level                                                 0
  Datenbank: 
  keine offenen Tabellen,
  aktueller Arbeitsbereich 1

  Private  data session JvP_sesRead_Factory                    2
  Transaction Level                                                 0
  Datenbank: 
  keine offenen Tabellen,
  aktueller Arbeitsbereich 1

  Private  data session jvp_frmerrormgr                        3
  Transaction Level                                                 0
  Datenbank: 
  keine offenen Tabellen,
  aktueller Arbeitsbereich 1

  Private  data session p_appl                                 4
+ Default  data session m_frmprogress
  Transaction Level                                                 0
  Datenbank: C:\PROGRAMDATA\JVP\JSS_SCHWEISSER\DATA\TEST2\TEST2.DBC
  keine offenen Tabellen,
  aktueller Arbeitsbereich 1

  Private  data session jvp_frmmetadata                        5
  Transaction Level                                                 0
  Datenbank: C:\PROGRAMDATA\JVP\JSS_SCHWEISSER\DATA\TEST2\TEST2.DBC
  Tabellen:   
  Nr. Alias                          RecCount     RecNo       BOF EOF Excl Buff SType DBF
    1 MODI_TEXTE                     0            1            X   X         1     3   C:\...\DATA\TEST2\MODI_TEXTE.DBF
S   2 PROJ_META                      20           11                         1     3   C:\...\DATA\TEST2\PROJ_META.DBF
    3 CURMETA_TEXTE                  416          417              X   X     5   101   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03EX.TMP
      Order : _CTEXT
    5 META_TEXTE                     417          417                        1     3   C:\...\DATA\TEST2\META_TEXTE.DBF

  Private  data session m_frmuserdata                          6
  Transaction Level                                                 0
  Datenbank: C:\PROGRAMDATA\JVP\JSS_SCHWEISSER\DATA\TEST2\TEST2.DBC
  Tabellen:   
  Nr. Alias                          RecCount     RecNo       BOF EOF Excl Buff SType DBF
    1 RECHTE                         9            1                          1     3   C:\...\DATA\TEST2\RECHTE.DBF
S   2 
    3 CURGETNUTZER                   1            1                    X     5   101   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03GY.TMP
    4 NUTZER                         2            2                          1     3   C:\...\DATA\TEST2\NUTZER.DBF
    5 CURREADRECHTE                  8            1                    X     5   101   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03HE.TMP
    6 CURNUTZERRECHTE_EDIT           1            1                    X     5   101   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03J8.TMP
    7 CURORDERRECHTE                 8            1                    X     5   203   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03I6.TMP
    8 CURSYSTEMSETTING_EDIT          1            1                    X     5   101   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03IM.TMP
    9 NUTZERRECHTE                   2            1                          1     3   C:\...\DATA\TEST2\NUTZERRECHTE.DBF
   10 SYSTEMSETTING                  2            2                          1     3   C:\...\DATA\TEST2\SYSTEMSETTING.DBF
   11 CURUSERSETTING_EDIT            0            1            X   X   X     5   101   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03JA.TMP
   12 USERSETTING                    1            1                          1     3   C:\...\DATA\TEST2\USERSETTING.DBF
   13 CURFELDRECHTE                  0            1            X   X   X     5   101   C:\...\APPDATA\LOCAL\TEMP\0000FI8P03J1.TMP



Objekteigenschaften:
So the code runs in datasession #4 -> p_appl while the table is open in #5 -> jvp_frmmetadata

The whole system is running for decades and not touched for a long time. I even can not reproduce the error.

>Could it be that the table is used several times, or with another alias?
>
>>Hi
>>
>>I have a strange problem
>>
>>I use the
>>
>>USE MyTable IN SELECT('MyTable') 
>>
>>syntax for a while
>>On some strange moments
>>I receive error 3 File is in use
>>
>>What I see
>>Prog is in a workarea without open cursor
>>MyTable is open shared in an other workarea
>>DATABASE is set correctly, SET DEFAULT points to the path of the database, only one database is open.
>>A CA that uses this table and might write to it is open
>>
>>The line is normally running fine, but sometimes it fails.
>>
>>Any idea why?
>>I know I can circumvent the very place, but to do this on ever in every place I use IN SELECT(). Ouch
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform