ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnMview with a database
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Patrick Quinn

United Kingdom
81 Posts

Posted - Jul 19 2017 :  19:20:47  Show Profile  Reply
I'm trying to use an TImageEnMView with a database so it shows thumbnails of image fields from the record set of a TDatasource.

I've declared fDBMultiBitmap: TIEDBMultiBitmap in Private declarations, and iexBitmaps in uses.

It compiles, but when I run it I get an access violation at this line of the form Create event.
fDBMultiBitmap := TIEDBMultiBitmap.Create(dmDatabase.dsImages, 'ThumbImage', 'Name', False);
(dmDatabase is a data module, dsImages is a TDatasource)

It happens on both Delphi 10.1 and 10.2. Any ideas why?

ImageEn version 7.0.0

xequte

38175 Posts

Posted - Jul 20 2017 :  06:50:10  Show Profile  Reply
Hi

What sort of database is it?

You might want to step into the code to see where the A/V arises.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Jul 20 2017 :  08:20:01  Show Profile  Reply
Hi Nigel
I'm using Absolute Database, a BDE replacement.

http://www.componentace.com/bde_replacement_database_delphi_absolute_database.htm

I use their table with a Delphi TDataSource. I have had no compatability problems with it and ImageEn. The TImageEnDbView works perfectly with it.

The access violation occurs at the TIEDBMultiBitmap.Create line when stepping through the code.

When I first put iexDBBitmaps in 'uses' and compiled, I got an error 'Unit iexDBBitmaps not found', so I opened the iexDBBitmaps.pas source code and it compiles.

Does iexDBBitmaps.pas need to be compiled into a package for it to work?

Patrick
Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Jul 21 2017 :  06:08:05  Show Profile  Reply
Hi Nigel

I think the exception is being caused by me.
I am am calling TIEDBMultiBitmap.Create in the main form create event, and it refers to a datasource in the datamodule, which is created after the main form is created.
I'll investigate later.

Apologies

Patrick

EDIT - That was the cause. Now working without problems. Sorry for my stupidity.
Go to Top of Page

xequte

38175 Posts

Posted - Jul 22 2017 :  00:25:24  Show Profile  Reply
No worries, we all have days like that.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: