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

adoquery error out of memory 2 1

Status
Not open for further replies.

kyriakos70

Programmer
Jul 24, 2008
87
GR
Hello,
I am still getting the out of memory error, even I have used the adoquery with this sql string :
Code:
 select * from scan inner join Table1 on scan.id=Table1.id where scan.id like '+quotedstr(edit1.text)
and have in the edit box the value of the primary key of the Table1 (master table), it still loads all the table scan (500-600 Mb) and I get the error out of memory, is there any other sql string to perform a better performance of memory?

Thank you
Kyriakos
 
Kyriakos,

Try to attack the problem from the root.
Your scans, what is it? documents? images?
Maybe you scan at a lower DPI/grayscale/B&W depending on what you need. There are maybe options to store the scan with better compression. This will all result in lower memory consumption. I don't know what this query is used for, is it a search function?
if yes, maybe store a thumbnailed version of the scan that you can show in the found records and when the user selects the record, show a new window with the full scanned version.

Like I said, it all depends on what you are trying to do.
Please provide more info.

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Code:
select * from scan inner join Table1 on scan.id=Table1.id where scan.id like '+quotedstr(edit1.text)

For whatever it is worth, here are a few questions regarding your SQL query:

1.) Do you really need all the fields from both the `scan` table and the `Table1` table?

2.) What data type is `scan`.`id`? Is it an integer? Or a VARCHAR/CHAR? Or...?

3.) If `scan`.`id` is an integer, can you replace the phrase in your "where" clause with:
Code:
...where scan.id = :scan_id
and, in code, replace the parameter, "scan_id", with the value from edit1.text?

4.) Have you tried something other than Delphi to execute this query? Microsoft Access? OpenOffice Base?

5.) As (what I think) Daddy was eluding to, roughly how big bytes-wise is the actual BLOB you are attempting to access?

Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top