Sign Up |  Live StatsLive Stats    Articles 35,345| Comments 159,788| Members 17,820, Newest waheguruhelpme| Online 220
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

Sikh Philosophy Network » Sikh Philosophy Network » Current Affairs » Information Technology » Reaches Maximum size (2GB) when calculating procedure

Reaches Maximum size (2GB) when calculating procedure

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 35 USD (9%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
Access DB at Maximum Size ryanp37 Information Technology 1 28-Jul-2006 08:33 AM
What is the maximum size of the database? janet Information Technology 1 28-Jul-2006 08:26 AM
Stored procedure/Macro... JOM Information Technology 1 28-Jul-2006 08:14 AM
Report - Stored Procedure - Grouping ZRexRider Information Technology 11 28-Jul-2006 08:14 AM
Cut and Paste procedure then test it in Immediate window nick kress Information Technology 0 19-Nov-2005 22:00 PM


Tags
2gb, calculating, maximum, procedure, reaches, size
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:22 AM
jj's Avatar jj
Guest
 
Posts: n/a
   
   
Reaches Maximum size (2GB) when calculating procedure

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Hi NG

I have two tables with approximately T1 = 1.5 million and T2 = 75000
records. I need to opdate T1 with information from T2, but my problem is
that it takes op very much space - and I dont know why - when I compact and
repair the database then it is reduced again, but I cant do that
automatically when running the procedure. Can anyone see through my problem.
?

My code is below:

Sub update_Jobnr
Set db = CurrentDb
Set rstCom = db.OpenRecordset("select Com from T2 group by Com")

While Not rstCom .EOF
Set rst = db.OpenRecordset("Select * from T2 where Com = " &
rstCom.Fields("Com") & "")
Set rst1 = db.OpenRecordset("select * from T1 WHERE Com= " &
rst.Fields("Com") , dbOpenDynaset)

While Not rst.EOF
If Not IsNull(rst.Fields("kode")) Then
If rst.Fields("side").Value = "U" Then
rst1.Filter = "Com= " & rst.Fields("Com") & " and KODE = " &
rst.Fields("kode") & " and no >= " & rst.Fields("From") & " And no <= " &
rst.Fields("To") & " and (no mod 2 = 1)"

Set rst2 = rst1.OpenRecordset()

While Not rst2.EOF
With rst2
.Edit
![Jobnr] = rst.Fields("Job")
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/11595-reaches-maximum-size-2gb-when-calculating.html
.Update
End With
rst2.MoveNext
Wend
rst2.Close
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11595
Else
'The same code just with (no mod 2 = 0)
end if

End If
rst.MoveNext
Wend
rst.Close

rstCom.MoveNext
Wend
rstCom.Close

end sub

TIA
JJ







 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:22 AM
John Vinson's Avatar John Vinson
Guest
 
Posts: n/a
   
   
Re: Reaches Maximum size (2GB) when calculating procedure

On Sat, 17 Jun 2006 09:48:22 +0200, "jj" wrote:

>I have two tables with approximately T1 = 1.5 million and T2 = 75000
>records. I need to opdate T1 with information from T2


Do you get the same bloating with a simple Update query, rather than
opening the tables as recordsets and using the Edit method?

Access isn't particularly good at garbage collection any way you do
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11595
it, though, so this might not make any real difference (I suspect it
will run a lot faster though!)
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11595

I'm not clear exactly what the purpose of this (frequent?) update
might be; is it really necessary to store this data, or could it be
calculated on the fly? Or is that just too slow given the size?

John W. Vinson[MVP]
Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:22 AM
Pat Hartman\(MVP\)'s Avatar Pat Hartman\(MVP\)
Guest
 
Posts: n/a
   
   
Re: Reaches Maximum size (2GB) when calculating procedure

  Donate Today!  
You will find update queries to be superior in every way to VBA code loops
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11595
that do multi-file matches.

"jj" wrote in message
news:%23rVfpJekGHA.3484@TK2MSFTNGP03.phx.gbl...
> Hi NG
>
> I have two tables with approximately T1 = 1.5 million and T2 = 75000
> records. I need to opdate T1 with information from T2, but my problem is
> that it takes op very much space - and I dont know why - when I compact
> and repair the database then it is reduced again, but I cant do that
> automatically when running the procedure. Can anyone see through my
> problem. ?
>
> My code is below:
>
> Sub update_Jobnr
> Set db = CurrentDb
> Set rstCom = db.OpenRecordset("select Com from T2 group by Com")
>
> While Not rstCom .EOF
> Set rst = db.OpenRecordset("Select * from T2 where Com = " &
> rstCom.Fields("Com") & "")
> Set rst1 = db.OpenRecordset("select * from T1 WHERE Com= " &
> rst.Fields("Com") , dbOpenDynaset)
>
> While Not rst.EOF
> If Not IsNull(rst.Fields("kode")) Then
> If rst.Fields("side").Value = "U" Then
> rst1.Filter = "Com= " & rst.Fields("Com") & " and KODE = " &
> rst.Fields("kode") & " and no >= " & rst.Fields("From") & " And no <= " &
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11595
> rst.Fields("To") & " and (no mod 2 = 1)"
>
> Set rst2 = rst1.OpenRecordset()
>
> While Not rst2.EOF
> With rst2
> .Edit
> ![Jobnr] = rst.Fields("Job")
> .Update
> End With
> rst2.MoveNext
> Wend
> rst2.Close
> Else
> 'The same code just with (no mod 2 = 0)
> end if
>
> End If
> rst.MoveNext
> Wend
> rst.Close
>
> rstCom.MoveNext
> Wend
> rstCom.Close
>
> end sub
>
> TIA
> JJ
>



Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Active Discussions
sikhism Who is "Mohan"?
Today 06:52 AM
21 Replies, 319 Views
sikhism need urgent advice.......
Today 06:46 AM
6 Replies, 72 Views
sikhism ਨਾਮਾ
Today 06:37 AM
2 Replies, 45 Views
sikhism Sikh Diamonds Video...
Today 04:23 AM
6 Replies, 112 Views
sikhism Are Creator and Creation...
Today 01:30 AM
44 Replies, 2,833 Views
sikhism Herman Hesse,...
Today 00:54 AM
13 Replies, 225 Views
sikhism On a Scale of Most...
Yesterday 21:42 PM
30 Replies, 1,277 Views
sikhism I became victim by...
Yesterday 19:50 PM
0 Replies, 39 Views
sikhism How important is Matha...
By Ishna
Yesterday 19:05 PM
58 Replies, 1,026 Views
sikhism Sikh Books downloads
Yesterday 15:39 PM
2 Replies, 62 Views
sikhism Salok Sheikh Farid ji...
Yesterday 09:35 AM
0 Replies, 43 Views
sikhism In Punjab, three farmers...
Yesterday 05:36 AM
0 Replies, 45 Views
sikhism Supernatural Sikhs, what...
Yesterday 03:45 AM
19 Replies, 408 Views
sikhism Sukhmani Sahib Astpadi...
26-May-2012 22:57 PM
0 Replies, 46 Views
Do You Think You Are...
26-May-2012 09:59 AM
94 Replies, 8,258 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 07:29 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.31580 seconds with 30 queries