Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not enough RAM

Status
Not open for further replies.

asm338s

Programmer
Jul 16, 2001
135
US
I am creating a report using foxpro and SQL:
Following is the code I am using and I get a message that I don't have enough RAM, may be because I have too many tables open.???

PROCEDURE gensumip

select 1031
set safety off

provVal = alltrim(oReports.provnocbo.value)

Select distinct alltrim(fkey) as fkey, cas02, cas03, provider, fiscalyear as fy, clmlvl.eradate from clmadj, clmlvl where val(cas02)=2 or val(cas02)=1 or val(cas02)=66 or val(cas02)=69 or val(cas02)=70 or val(cas02)=71 or val(cas02)=85 or val(cas02)=87 or val(cas02)=96 or alltrim(cas02)='A2' or alltrim(cas02)='B3' and alltrim(provider) = provVal into table castmp
select fkey, provider, eradate, fy, cas02, cas03 from castmp where (fkey in (select pkey from ipclm)) into table casval

select provider as prov, cas02, sum(val(cas03)) as coins from casval where val(cas02)=2 and alltrim(provider) = provVal into table coins2
select provider as prov, cas02, sum(val(cas03)) as cash from casval where val(cas02)=1 and alltrim(provider) = provVal into table cash1
select provider as prov, cas02, sum(val(cas03)) as blood from casval where val(cas02)=66 and alltrim(provider) = provVal into table blood66
select provider as prov, cas02, sum(val(cas03)) as dout from casval where val(cas02)=69 and alltrim(provider) = provVal into table doutl
select provider as prov, cas02, sum(val(cas03)) as cout from casval where val(cas02)=70 and alltrim(provider) = provVal into table coutl
select provider as prov, cas02, sum(val(cas03)) as msp from casval where val(cas02)=71 and alltrim(provider) = provVal into table prpay
select provider as prov, cas02, sum(val(cas03)) as intr from casval where val(cas02)=85 and alltrim(provider) = provVal into table intamt
select provider as prov, cas02, sum(val(cas03)) as trasf from casval where val(cas02)=87 and alltrim(provider) = provVal into table tfamt
select provider as prov, cas02, sum(val(cas03)) as noncov from casval where val(cas02)=96 and alltrim(provider) = provVal into table ncovchg
select provider as prov, cas02, sum(val(cas03)) as adj from casval where alltrim(cas02)='A2' and alltrim(provider) = provVal into table contadj
select provider as prov, cas02, sum(val(cas03)) as cov from casval where alltrim(cas02)='B3' and alltrim(provider) = provVal into table covchg

Select provider, fiscalyear as fy, clmlvl.eradate, clmlvl.pkey, mia16, mia06, mia13, mia14, mia08 from ipclm, clmlvl where alltrim(ipclm.pkey) = alltrim(clmlvl.pkey) into table step2
Select provider, fy, eradate, sum(val(mia16)) as fedsp, sum(val(mia06)) as dsh, sum(val(mia14)) as hosp, sum(val(mia13)) as ind, sum(val(mia08)) as pps from step2 where alltrim(provider) = provVal into table rep3iptmp

Use rep3ip excl
Zap && zap table to get rid of the data set for reports created earlier
Append from rep3iptmp
Goto top

If (reccount()=0)
Messagebox("No records located.",48,"PC Print+ Archive")
Else
If oReports.optiongroup1.option2.value=1
Report form ppprpt3test22 noeject NOCONSOLE TO PRINTER PROMPT
Else
Report form ppprpt3test22 preview
Endif
Endif

Use && closes last opened table

Return && end of procedure
 
Anyone has any idea about solving this problem?
 
U may want to try a different forum. Not sure if there is one for Foxpro. Most people on this forum are Access people, rather than Foxpro. You never know, someone here may be able to help u. Hope this is ok. If not, just let me know.

Nick (Everton Rool OK!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top