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!

Insufficient Memory when specify database in SQL

Status
Not open for further replies.

CritterLover

Programmer
Jul 21, 2003
19
0
0
US
I've created a Query which I plan to expand to use 2 databases using thread 102-383313 as my model. I'm getting errors and trying to track down from what so I've simplified the SQL to what you see below which only uses one database. When I remove the:
from ":DVFacts:caa44240", ":DVFacts:caa44340"
and replace it with:
from caa44240, caa44340
and specify the database as DVFacts in the properties then I can set the Active property to True. With the SQL (below) I get 'Insuffient Memory for this Operation'. I have raised the MAXBUFSIZE to 4096
MAXHANDLES to 60
SHAREDMEMSIZE to 4096
MEMSIZE to 20
in the BDE Administrator.

Select
caa44240.caa442400011, caa44240.caa442400012, caa44240.caa442400013, caa44240.caa442400014,
caa44340.caa443400011, caa44340.caa443400012, caa44340.caa443400013, caa44340.caa443400014,
caa44340.caa44340002, caa44240.caa44240042
from ":DVFacts:caa44240", ":DVFacts:caa44340"
where
caa44240.caa442400011=caa44340.caa443400011
and caa44240.caa442400012=caa44340.caa443400012
and caa44240.caa442400013=caa44340.caa443400013
and caa44240.caa442400014=caa44340.caa443400014
and caa44240.caa44240042=22737

Any ideas? I can't even get the syntax to work and I haven't even added the 2nd database yet! Is there some trick I'm just clueless on? Thanks in advance!
 
At a guess, I would rewrite the query to use aliases for the database names so that it looks something like this:
Code:
SELECT 
  a.caa442400011, a.caa442400012, a.caa442400013, a.caa442400014, 
  b.caa443400011, b.caa443400012, b.caa443400013, b.caa443400014, 
  b.caa44340002, a.caa44240042
FROM ":DVFacts:caa44240" a, ":DVFacts:caa44340" b
WHERE a.caa442400011=b.caa443400011
  AND a.caa442400012=b.caa443400012
  AND a.caa442400013=b.caa443400013
  AND a.caa442400014=b.caa443400014
  AND a.caa44240042=22737
I suppose your column names mean something to somebody ;-)

Andrew
 
Thanks for the input. I tried that to no avail - I get the same error message. Just to 'clear my name' this is using a database from a purchased (!) product - I didn't create it or the file/field names - if I had I should be shot! Any other ideas anybody?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top