Inserting a Bitmap in a DAO recodset
Alain ACCAOUI -- Alain.Accaoui@sligos.fr Thursday, February 13, 1997 Environment: Win95;MSVC 4.2b Hi there, I am working on an application where I need to insert a Bitmap in an Access 7.0 Table throw DAO under VC++4.2. Does anyone know how to do such a thing ??? Any piece of code or any helpful information would be great. Thank you, *********************************** Mail: Alain.Accaoui@ci.sligos.fr ***********************************
Kefah Ibrahim -- KIbrahim_Ideal@nets.com.jo Sunday, February 16, 1997 Hi there, Here is the solution for what you asked, I faced the same problem few months ago. Bitmap are considered Binary data, and DAO needs data to be in COleVariant to be inserted. Now, what you need is how to convert binary data( Bitmap) to COleVariant and vice versa. There is a very helpful Microsoft KBase article that has the title" How to access Binary data using dbDoa" (PSS ID #: Q152294) under the ( C Compiler ) topics. And because you are working on Win95 (32-bit) you need to modify the line that use memcpy to be CopyMemory and this is the 32-bit version of memcpy !!! Enjoy and best regards, yours Kefah Jizmawi e-mail: KIbrahim_Ideal@nets.com.jo
Become an MFC-L member | Вернуться в корень Архива |