UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Access System Resource....currentfreesize, Access 2013    
 
   
pacala_ba
post Jun 5 2015, 08:19 AM
Post#1



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Hi, Missing TOOL
Access.System.Resource.CurrentFreeSize=......? iconfused.gif
Go to the top of the page
 
DanielPineault
post Jun 5 2015, 08:45 AM
Post#2


UtterAccess VIP
Posts: 6,900
Joined: 30-June 11



Could you elaborate a little.

Is this an error message you are receiving?
When does it appear?
Go to the top of the page
 
RAZMaddaz
post Jun 5 2015, 08:52 AM
Post#3


UtterAccess VIP
Posts: 9,596
Joined: 23-May 05
From: Bethesda, MD USA


In VBA under Tools - References, what references do you have checked? Might you have changed/unchecked any of these?

RAZMaddaz
Go to the top of the page
 
GroverParkGeorge
post Jun 5 2015, 09:06 AM
Post#4


UA Admin
Posts: 35,867
Joined: 20-June 02
From: Newcastle, WA


You have identified this as a missing tool.

I can find no reference anywhere to something by the name.

What are you trying to accomplish?
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 09:08 AM
Post#5



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Sometimes (not very often laugh.gif ) , appears this Error
System Resource Exceeded
I want to find some TOOL , how to verify free resources.... iconfused.gif

For example: lightbulb.gif
DAO.recordset.GetRows(100000000) ' 3035,System resource exceeded, it is really ACCESS BUG
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 09:17 AM
Post#6



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


QUOTE
You have identified this as a missing tool.
I can find no reference anywhere to something by the name.

....that is really ANNOYING thing cryhard.gif

What are you trying to accomplish?
I am running some jobs in "ATORUN-MODE" (over night)
...after this error, i can NOTHING to do... pullhair.gif
Go to the top of the page
 
RAZMaddaz
post Jun 5 2015, 09:19 AM
Post#7


UtterAccess VIP
Posts: 9,596
Joined: 23-May 05
From: Bethesda, MD USA


Have you tried importing only a few Tables, Queries, etc at a time into a new Table, to try to narrow down what might be causing the problem?

RAZMaddaz
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 09:27 AM
Post#8



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


QUOTE
Have you tried importing only a few Tables, Queries, etc at a time into a new Table, to try to narrow down what might be causing the problem?


It is ++RANDOM / FATAL ++ problem iconfused.gif pullhair.gif pullhair.gif pullhair.gif
Sometimes , i recreate myDB (no Tables with data (only templates-tables), no-Queries (all is strSQL) ) if myDB.Size> ~ 30-50 MB
Go to the top of the page
 
RAZMaddaz
post Jun 5 2015, 09:28 AM
Post#9


UtterAccess VIP
Posts: 9,596
Joined: 23-May 05
From: Bethesda, MD USA


So after you import or with the existing Table, have you run "Compact and Repair?"
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 09:50 AM
Post#10



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


QUOTE
So after you import or with the existing Table, have you run "Compact and Repair?"

YES
Sometimes , i run Compact and Repair on myDB ( if myDB.Size > ~ 30-50 MB, in startupform.checkDbsize() )
Sometimes , i recreate myDB (no Tables with data (only templates-tables), no-Queries (all is strSQL) ) if myDB.Size> ~ 30-50 MB

existing Table...?
I have NO TABLES in myDB
Go to the top of the page
 
jwhite
post Jun 5 2015, 09:54 AM
Post#11


UtterAccess VIP
Posts: 5,818
Joined: 31-August 06
From: North Carolina, USA


It may be created objects in code are not closed/set to nothing after their use is completed, such as:

Dim rs As DAO.RecordSet
Set rs = currentdb.openrecordset(...)

.. code to work with rs ...

rs.Close
Set rs = Nothing

Anytime you SET something, look to close/set to nothing. Also, if you are using arrays, add a line right before the exit within the sub/function to: Erase YourArrayVariableName
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 10:02 AM
Post#12



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


QUOTE
close/set to nothing

Yes , you are right, i do it , but i can not say on 100%...( I am Symbian c++...)

dim myArray1()
Erase myArray1VariableName.................OK

dim myArray as Variant
shoud i use: myArray = vbnullstring......? iconfused.gif
Go to the top of the page
 
jwhite
post Jun 5 2015, 10:13 AM
Post#13


UtterAccess VIP
Posts: 5,818
Joined: 31-August 06
From: North Carolina, USA


If you say you are not 100% sure you are closing objects you create, then you should review all your code to make sure you are.

How to use the Erase Statement

You can learn much more about VBA coding on that site, and also on the site in my signature below for FnX.

Also, I would never think defining an array as "Variant" would be a wise choice unless you will be dealing with multiple data types. Use a data type that matches the data you will have in the array.
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 10:26 AM
Post#14



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


OK
QUOTE
Also, I would never think defining an array as "Variant" would be a wise choice.
Use a data type that matches the data you will have in the array.


dim myArray as Variant
shoud i use: myArray = vbnullstring......?

Example code:
CODE
Public Function ARRAY_FROM_STRING(Expression, Optional Delimiter As String = ",", _
    Optional Limit As Long = -1, Optional Compare As VbCompareMethod = vbTextCompare) As Variant



I am running the same code as in AC.2003....
AC.2003....OK thumbup.gif
AC.2013....sometimes NOT OK thumbdn.gif

In Symbian c++, there was an TOOL to identify memory leaks...
It is MISSING TOOL in ACCESS... pullhair.gif
Go to the top of the page
 
cheekybuddha
post Jun 5 2015, 10:28 AM
Post#15


UtterAccess VIP
Posts: 11,518
Joined: 6-December 03
From: Telegraph Hill


You should be fine letting native datatype variables clean up after themselves when they go out of scope.

However, it is wise to set all objects to nothing once no longer needed.

So, wherever you:
Set objVar = SomeClass

Then when you're finished:
Set objVar = Nothing

If you are going to fill your array using the Array() function, then I think you must declare the initial variable as a variant.


hth,

d
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 10:32 AM
Post#16



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


In my Db
Erase....................380x
Set x= Nothing ...2199x
Go to the top of the page
 
pacala_ba
post Jun 5 2015, 11:02 AM
Post#17



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Sub Test_Array_Erase()
Dim ln1 As Long, lv1 As Variant, la1() As Variant, la2() As String
'Erase ln1 'Compile.ERR=Expected array
Erase lv1
Erase la1
Erase la2
Erase lv1, la1, la2
End Sub

I found in myDB:
dim varArray as Variant
varArray = vbnullstring.........................? WRONG confused.gif
Erase varArray.......................may be, i should use iconfused.gif compute.gif
Go to the top of the page
 
pacala_ba
post Jun 8 2015, 06:11 AM
Post#18



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Test: SystemResource.GetCurrentFreeSize()

Test_ArrayErase_Loop() ' TEST with/without Variant array lv1 cleanup
Test_DAO_Recordset_GetRows_Loop() 'generate System resource exceeded.

Test_Array_MemoryFreeMax()
253, ReDim.UB=20000253' allways the same number iconfused.gif
7 Out of memory

CODE
Option Compare Database
Option Explicit
'****************************************************************************
Sub Test_ArrayErase_Loop()
Dim i As Long, i_max As Long
For i = 1 To 10
    Debug.Print i
    Call Test_ArrayErase
Next i
Debug.Print "***END***"
End Sub
Sub Test_ArrayErase()
Dim i As Long, i_max As Long
Dim ln1 As Long, lc1 As String, lc2 As String, lv1 As Variant
ln1 = 10000000 'VERY-BIG-STRING
ln1 = 1000000 'VERY-BIG-STRING
lc1 = String$(ln1, "A")
For i = 1 To 10
    lc2 = lc2 & lc1 & ","
Next i
lv1 = AA_FROM_STRING(lc2)
'Debug.Print "Array_UB: " & AA_UB(lv1)
'---------------------------
'CleanUp..!!!
If IsEmpty(lv1) Then Debug.Print "IsEmpty(lv1)=" & IsEmpty(lv1)
If UBound(lv1) < 0 Then Debug.Print "IsEmpty(lv1)=" & IsEmpty(lv1)
'Erase lv1  '<---- TEST: SWITCH ON/OFF
End Sub
'****************************************************************************
Sub Test_Array_MemoryFreeMax()
On Error GoTo LBL_xPAC_ERR
Dim ln1 As Long, la1() As Variant
ln1 = 20000252 + 1 'LIMIT-MAX, for Err: 7,Out of memory
ReDim Preserve la1(0 To ln1)
'...ReDim Preserve la2(0 To 100000000)
LBL_xPAC_END:
    Erase la1
Exit Sub
LBL_xPAC_ERR:
' 7,Out of memory, 19560000
Debug.Print Err, Err.Description
'Resume Next
'Resume
Resume LBL_xPAC_END
End Sub
Sub Test_Array_MemoryFreeCur()
On Error GoTo LBL_xPAC_ERR
Dim i As Long, i_max As Long, i_step As Long
Dim ln1 As Long, lc1 As String, la1() As Variant
ln1 = 20002000 'LIMIT-MAX,  NEW-DB, for Err: 7,Out of memory
ln1 = 20000252 'LIMIT-MAX, TEST-DB, for Err: 7,Out of memory
'ReDim Preserve la1(0 To ln1)
ln1 = 20000000
i_step = 1000000
i_step = 1000
i_step = 1
For i = 1 To 10000
    ln1 = ln1 + i_step
    Debug.Print i & ", ReDim.UB=" & ln1
    ReDim Preserve la1(0 To ln1)
Next i
LBL_xPAC_END:
    Erase la1
Exit Sub
LBL_xPAC_ERR:
' 7,Out of memory, 19560000
Debug.Print Err, Err.Description
'Resume Next
'Resume
Resume LBL_xPAC_END
End Sub
Public Function AA_FROM_STRING(Expression, Optional Delimiter As String = ",", _
    Optional Limit As Long = -1, Optional Compare As VbCompareMethod = vbTextCompare) As Variant
On Error GoTo LBL_xPAC_ERR
Dim lcXName As String, lcXUser As String, lnXUAsk As Long
lcXName = "AA_FROM_STRING"
If IsNull(Expression) Then GoTo LBL_xPAC_END
AA_FROM_STRING = Split(CStr(Expression), CStr(Delimiter), Limit, Compare)
LBL_xPAC_END:
Exit Function
LBL_xPAC_ERR:
Resume Next
Resume
Resume LBL_xPAC_END
End Function
Public Function AA_UB(var As Variant) As Long
On Error Resume Next
    AA_UB = UBound(var)
End Function
'****************************************************************************
Sub Test_DAO_Recordset_GetRows_Loop()
Dim i As Long, i_max As Long
For i = 1 To 100
    Debug.Print i
    If Not Test_DAO_Recordset_GetRows Then Exit For
Next i
Debug.Print "***END***"
End Sub
Function Test_DAO_Recordset_GetRows() As Boolean
On Error GoTo LBL_xPAC_ERR
Dim DB As DAO.Database, rs As DAO.Recordset, TBL As DAO.TableDef
Dim i As Long, ll_IGN_3265 As Boolean, lc_TT As String, lv1 As Variant
lc_TT = "TABLE_TEST"
    Set DB = CurrentDb
    Set TBL = New DAO.TableDef
    TBL.Name = lc_TT
    TBL.Fields.Append TBL.CreateField("Field1", dbText, 10)
    TBL.Fields.Refresh
    ll_IGN_3265 = True
DB.TableDefs.Delete lc_TT
ll_IGN_3265 = False
DB.TableDefs.Append TBL
DB.TableDefs.Refresh
'------------------
Set rs = DB.OpenRecordset(lc_TT, dbOpenDynaset, dbAppendOnly)
rs.AddNew
rs.Fields("Field1") = "ABC"
rs.Update
rs.Close
Set rs = DB.OpenRecordset(lc_TT)
'lv1 = rs.GetRows(1000000000) ' 9x0, 3035,System resource exceeded.
'lv1 = rs.GetRows(100000000)   ' 8x0
lv1 = rs.GetRows(10000000)   ' 7x0
rs.Close
'..DB.Close
LBL_xPAC_END:
    Test_DAO_Recordset_GetRows = Not IsEmpty(lv1)
    Set rs = Nothing
    Set TBL = Nothing
    Set DB = Nothing
    If Not IsEmpty(lv1) Then Erase lv1
Exit Function
LBL_xPAC_ERR:
If ll_IGN_3265 Then Resume Next
'MsgBox Err & "," & Err.Description, vbCritical
Debug.Print Err & "," & Err.Description
Resume Next
Resume
Resume LBL_xPAC_END
End Function
'****************************************************************************
Go to the top of the page
 
pacala_ba
post Jun 17 2015, 07:18 AM
Post#19



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Hi, today another...
CODE
? cSQL
UPDATE [KK_SE_4L_1] SET [PR_STRING] = '' WHERE (LEN(Trim$(NZ([PR_STRING]))) = 0);
cnn0.Execute cSQL, i_EXEC, adCmdText
? err,err.Description
-2147467259   System resource exceeded.


After this Error ,I can still fill some random string , up to 8 milion characters iconfused.gif
lcTAB_imp_Name = string$(8000000,"a")
? len(lcTAB_imp_Name)
8000000

After this Error ,I can still fill some random Variant Array up to 0,4 milion elements iconfused.gif
lv1 = Array_CREATE ( "" ,"X",400000)........................OK
? UBOUND( lv1)
400000

lv1 = Array_CREATE ( "" ,"X",500000)....OUT OF MEMORY

i can still fill some others 3-TREE (from VBE.local VARIABLE windows) Variant Array up to 0,4 milion elements iconfused.gif iconfused.gif

the limit is on the XXXL -array number = 4
Error message: There is not enough memory to perform this operation, close unneeded programs, and try the operation again.


lcTAB_imp_Name = string$(8000000,"a") err=14, Out of string space
lcTAB_imp_Name = string$(800000,"a").........OK
lcTAB_imp_Name = string$(8000000,"a").......OK... iconfused.gif
lcTAB_imp_Name = string$(8000000,"a") err=14, Out of string space
....... another loop the same
lcTAB_imp_Name = string$(800000,"a").........OK
lcTAB_imp_Name = string$(8000000,"a").......OK... iconfused.gif
lcTAB_imp_Name = string$(8000000,"a") err=14, Out of string space, EVERY SECOND TRY with ERROR confused.gif
Go to the top of the page
 
pacala_ba
post Jul 14 2015, 10:10 AM
Post#20



Posts: 660
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


What says Microsoft...
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search


RSSSearch   Top   Lo-Fi    16th October 2019 - 09:48 PM