Hello there
I run a script that calculates what different surfaces cost to maintain, I only run it now and then and never had a problem with it before. Anyway lately it runs for a while and then this error message that Mapinfo can not access a TMP file, if I go with "retry" it runs for a while longer than it comes up again with another TMP file. And I have not made any changes to the script since it was working flawless either. I figured its something with some windows update and windows security policies or some antivirus thing or maybe some setting in MapInfo or so?.
The script does not use so much temporary files, I think as I use noselect / hide as much as can. Tried to erase everything in the folder I believe the files are at C:\Users\marthoXXX\AppData\Local\Temp\MIPRO
I run MI pro Version 23.1 Relese Build 181
Any ideas?
The code I run is like this :
SUB Uppdat_ytpris
Dim html,marktypen,distrikt,stadfrekvens,lovhantering,tillvalet as string
Dim x, y,totalpris,stadpriset,lovpriset,tillvalspriset As Float
Dim i, i_found, i_row_id, i_win_id,areal,nrows,record As Integer
Dim s_table As Alias
'Fungerar inte på SQL server 'set table alla_skisser_lff FastEdit on undo Off
Set Event Processing Off
Set Progressbars Off
select marktyp_1,area_1,pon_distrikt,städning,lövhantering,tillval,ytpris from alla_skisser_lff where skötselkategori = "Ordinarie entreprenad" and marktyp_1<>"" and pon_distrikt not in ("","14. styrsö") order by pon_distrikt,marktyp_1 into yt_collection 'noselect
Fetch First From yt_collection
Do While Not EOT (yt_collection)
print yt_collection.rowid
nrows=nrows+1
marktypen = yt_collection.marktyp_1
areal = yt_collection.area_1
distrikt = yt_collection.pon_distrikt
stadfrekvens = yt_collection.städning
lovhantering = yt_collection.lövhantering
tillvalet = yt_collection.tillval
Select pon_distrikt_match,marktyp,skötselordning,sum(pris)"priset" from EntreprenadPrislistor where marktyp = marktypen and pon_distrikt_match = distrikt and skötselordning <7 into samling noselect hide
totalpris = samling.priset
Select pon_distrikt_match,marktyp,skötselmoment,pris from EntreprenadPrislistor where pon_distrikt_match = distrikt and marktyp = marktypen and skötselmoment = stadfrekvens into stadpris noselect hide
stadpriset = stadpris.pris
Select pon_distrikt_match,marktyp,skötselmoment,pris from EntreprenadPrislistor where pon_distrikt_match = distrikt and marktyp = marktypen and skötselmoment = lovhantering into lovpris noselect hide
lovpriset = lovpris.pris
Select pon_distrikt_match,marktyp,skötselmoment,pris from EntreprenadPrislistor where pon_distrikt_match = distrikt and marktyp = marktypen and skötselmoment = tillvalet into tillvalpris noselect hide
tillvalspriset = tillvalpris.pris
totalpris = totalpris +stadpriset+lovpriset+tillvalspriset
Update yt_collection Set Ytpris = totalpris*areal where Rowid=nrows
totalpris=0
stadpriset=0
lovpriset=0
tillvalspriset=0
Fetch Next From yt_collection
loop
Note "klart"
END SUB
------------------------------
Martin Thorn
Göteborgs Stad
------------------------------