Solved

"Bitmap Image is not valid" raised when displaying TDBImage

Posted on 2004-09-30
7
726 Views
Last Modified: 2009-07-29
Hi guys,

I moved my paradox tables to SQL and I am trying to access the new Database using the same Application thru ODBC. I cannot access the bitmaps stored in the blob fields using the TDBimage controls.
An error raises: "Bitmap Image is not valid" for every record when a TDBimage refers to one of its fields.
On the other hand, if I paste an image on one of them, they work fine.
I´ve tried hard to look for a solution by myself, but It´s beyond my knowledge, so I´d appreciate some help.

Thanks.
0
Comment
Question by:LUIS957
  • 3
  • 2
7 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 12194852
How did you move the tables and what datatype are you using bor the bitmap column?
0
 
LVL 6

Accepted Solution

by:
gwalkeriq earned 500 total points
ID: 12195540
How were the images stored in paradox (i.e., GIF, BMP,etc.). As I recall, default bitmap viewers (TImage or TDBImage) in Delphi only support windows bitmap and JPEG by default, you have to add extra code to support GIF, etc.
0
 

Author Comment

by:LUIS957
ID: 12195548
I created an ADOCommand with run-time created parameters like that:

for k:=0 to table1.FieldCount-1 do
begin
with AdoCommand1.Parameters.AddParameter do
begin
name:=table1.Fields[k].FieldName;
case table1.Fields[k].DataType of
ftgraphic:datatype:=ftblob;
else
datatype:=table1.Fields[k].DataType;
end;
Size:=table1.Fields[k].size;
end;
{... other stuffs...}
end;

then
I use a SQL sentence like bellow:
Insert into <table> (field1,...,blobfield,...,fieldn) values (:field1, ...,:tblobparameter,...,:fieldn)

I am using "image" datatype for the table field
for the tblobfield.blobtype property I am using "ftblob"

Either I use an ADOTable with OLEDB or I use TTable with ODBC I get the message, then I suppose something wrong has occured during the moving of the tables.

 
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 6

Expert Comment

by:gwalkeriq
ID: 12195606
I remeber this is a bug in some versions of the ODBC drivers that cause problems when moving blobs that are greater than 64K in length. Does this seem likely?
0
 

Author Comment

by:LUIS957
ID: 12195612
Most of the images where captured from a scanner. Some of them thru paint.
0
 

Author Comment

by:LUIS957
ID: 12445356
I'm sorry I didn´t answered it before. It took me some time to test the hipotesys of using other format than BMP in the tdbimage component. I was using an extended version of it which could accept JPG and GIF formats. It seems the extended version was prepared to deal with those format if they come from a paradox database, but not from MSSQL.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question