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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GenDBC Problem

Status
Not open for further replies.

hawkcg

Programmer
Dec 10, 2001
23
US
I am trying to run GenDBC on a databaase with all local views, expressly intending to transform it into a script that will write the remote views for me. My problem is that when GenDBC gets 99% finished, it gives an error.

"Unrecoverable Error: Program is too large. At Line: 460"

The *.prg is not created and the build fails. Any ideas?
 
From MSDN:

Program is too large (Error 1202)
The program that Visual FoxPro is attempting to load will not fit into memory. The largest program or individual procedure Visual FoxPro can load is one containing 65,000 bytes.

Sounds like your database has too many parts to it. That's just a guess, of course...

Ian
 
Are you saying 65,000 KB or 65 KB? 65 KB would be an awfully small size.
 
I did a direct cut/paste. It actually says 65,000 bytes, which is about 64k.

My largest .PRG file is only 39k in size, so I can't verify this myself.

Ian
 
OK. How do I make it smaller then?
 
How many tables/views/relations/etc are in your database? How big are your stored procedures?

I honestly have never used GenDBC myself. However, looking at the source code, here is line 460:
[tt]
COMPILE (m.cOutFile)
[/tt]
So, the PRG file SHOULD be there. The program is only crashing trying to compile it. If you hit IGNORE on that line, it should complete the rest of the process and the PRG file should be present so you can browse through it. You just won't be able to run it.

Ian
 
Hmm...ok, scratch the whole thing. If you look at the CrownBase project by Weedz, one of his PRG files is 496k which compiles into a 287k FXP file. VFP 6, at least, has no problem with it. The MSDN must be wrong, or must be from an older version... (I'm looking at the one from April 2001 which, I think, is the last one they did before VFP 7)

What version of VFP are you using?

Ian
 
Ian,
I think you've "found" the answer. If "hawkcg" is using VFP 5.0, that version of GENDBC had some major limitations. Some developers (Steve Arnott and Steve Sawyer) got together and wrote an alternative - GENDBCX.PRG, which eliminated the restrictions. MS liked it so much they adopted the technique for the GENDBC that's included with VFP 6.0/7.0!

Rick
 
Could be...but if the program were different, then his error wouldn't likely have occurred on line 460. You would think it would be a different line number!

In any case, we'll see when he responds next. :eek:)

Ian
 
Ian,
It could actually be line 460 in the GENDBC program where it's gettting the error - generating the "huge" new .PRG file.

Rick
 
*nods* That's what I meant. Line 460 in the GENDBC program (in version 6.0) is the line that compiles the generated PRG file. I sincerely doubt it would be the same line number in a completely different program!

Still...any idea what the new size limit would be? I would imagine there is one, even if it's astronomical...

Ian
 
I am using VFP 6 on one machine and VFP 7 on another, just to see if it would make any difference. I still get the same error. I tried running GENDBCX as well, but it gave me the same problem, just on a different line number. I would think that the size requirement would be bigger as well, but I'm stumped on this one. My last resort is typing out all of the code that I need. I am amending a program that writes SQL remote views, and the original program was created using GenDBC. The guy that wrote it said he modifies it by hand now, which is not the most appealing thing to me, but it seems I have no choice.

Thanks for all your help, and if you have any other suggestions, please let me know.

Clay
 
Are you sure that you don't end up with a PRG file? The crash is occurring at the line where it tries to COMPILE the generated program...so the program must be there. How big is the file?

Ian
 
Yes, there is a file. I was just looking at that. The file is 3.20 MB. It won't compile, but enough was written for me to get what I want out of it.

Thanks to everyone for their help. This message board always helps!!!

Clay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top