Posting Blobs in DLL - Exeption: Invalid Type Casting

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alf.krause
Posts: 7
Joined: Wed 20 Sep 2006 09:44

Posting Blobs in DLL - Exeption: Invalid Type Casting

Post by alf.krause » Wed 20 Sep 2006 09:49

invalid typecasting while posting tables unsing TMyQuery with Blob-Fields (for instance Mysql Type text) from a dll. If i convert the Projekt to standalone exe it's work. It is also in the Sample My_dll from crlab


MyDac: 4.40.0.18

Borland® Developer Studio 2006
10.0.2288.42451 Update 2

Mysql 4.1.14 nt

THX

Alf

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 21 Sep 2006 14:03

As we answered you by e-mail, problem occurs due to different instances of class types in exe and dll
modules. In other words, object with type TMyQuery created in exe has different class type than object with type TMyQuery created in dll. To make exe and dll module use the same instances please enable using
runtime packages:
check Project -> Options -> Packages -> "Build with runtime packages"
and add dac70 and mydac70 packages to list.

Post Reply