In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

TSQLTable: save long binary data to file

Xailer professional forum in English
Responder
Guest

TSQLTable: save long binary data to file

Mensaje por Guest »

Hi,
how can I save the content of a long binary data field from a SQLTable (MS
Access) to a file?
Best regard, Timm.
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TSQLTable: save long binary data to file

Mensaje por jfgimenez »

Timm,
> how can I save the content of a long binary data field from a SQLTable (MS
> Access) to a file?
Use the field value from the dataset directly. Something like:
hFile := FCreate( "SomeFile.dat" )
FWrite( hFile, ::oDataSet:LongBinaryField, Len(
::oDataSet:LongBinaryField ) )
FClose( hFile )
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TSQLTable: save long binary data to file

Mensaje por jfgimenez »

Timm,
> how can I save the content of a long binary data field from a SQLTable (MS
> Access) to a file?
Use the field value from the dataset directly. Something like:
hFile := FCreate( "SomeFile.dat" )
FWrite( hFile, ::oDataSet:LongBinaryField, Len(
::oDataSet:LongBinaryField ) )
FClose( hFile )
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Guest

TSQLTable: save long binary data to file

Mensaje por Guest »

Jose,
many thanks for your answer!
I already tried something similar to your solution but I can´t open
the created file. I expected to get a graphic file (bmp or jpg) but the
file seems to have an other content.
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=46b2fb58@ozsrv2.ozlan.local...]46b2fb58@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> how can I save the content of a long binary data field from a SQLTable
>> (MS Access) to a file?
>
> Use the field value from the dataset directly. Something like:
>
> hFile := FCreate( "SomeFile.dat" )
> FWrite( hFile, ::oDataSet:LongBinaryField, Len(
> ::oDataSet:LongBinaryField ) )
> FClose( hFile )
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
Guest

TSQLTable: save long binary data to file

Mensaje por Guest »

Jose,
many thanks for your answer!
I already tried something similar to your solution but I can´t open
the created file. I expected to get a graphic file (bmp or jpg) but the
file seems to have an other content.
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=46b2fb58@ozsrv2.ozlan.local...]46b2fb58@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> how can I save the content of a long binary data field from a SQLTable
>> (MS Access) to a file?
>
> Use the field value from the dataset directly. Something like:
>
> hFile := FCreate( "SomeFile.dat" )
> FWrite( hFile, ::oDataSet:LongBinaryField, Len(
> ::oDataSet:LongBinaryField ) )
> FClose( hFile )
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TSQLTable: save long binary data to file

Mensaje por jfgimenez »

Timm,
> many thanks for your answer!
> I already tried something similar to your solution but I can´t open
> the created file. I expected to get a graphic file (bmp or jpg) but the
> file seems to have an other content.
Perhaps it contains an 'OLE object', that is, an 'OLE compound document'. If
so, I'm affraid it's not an easy task to get it. You'll have to deal
directly to several COM interfaces at low level.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TSQLTable: save long binary data to file

Mensaje por jfgimenez »

Timm,
> many thanks for your answer!
> I already tried something similar to your solution but I can´t open
> the created file. I expected to get a graphic file (bmp or jpg) but the
> file seems to have an other content.
Perhaps it contains an 'OLE object', that is, an 'OLE compound document'. If
so, I'm affraid it's not an easy task to get it. You'll have to deal
directly to several COM interfaces at low level.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Guest

TSQLTable: save long binary data to file

Mensaje por Guest »

Jose,
yes, it contains an 'OLE object'.
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:46b6dbde$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> many thanks for your answer!
>> I already tried something similar to your solution but I can´t open
>> the created file. I expected to get a graphic file (bmp or jpg) but the
>> file seems to have an other content.
>
> Perhaps it contains an 'OLE object', that is, an 'OLE compound document'.
> If so, I'm affraid it's not an easy task to get it. You'll have to deal
> directly to several COM interfaces at low level.
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
Guest

TSQLTable: save long binary data to file

Mensaje por Guest »

Jose,
yes, it contains an 'OLE object'.
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:46b6dbde$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> many thanks for your answer!
>> I already tried something similar to your solution but I can´t open
>> the created file. I expected to get a graphic file (bmp or jpg) but the
>> file seems to have an other content.
>
> Perhaps it contains an 'OLE object', that is, an 'OLE compound document'.
> If so, I'm affraid it's not an easy task to get it. You'll have to deal
> directly to several COM interfaces at low level.
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
Responder