 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mark Brown Guest
|
Posted: Fri Jun 09, 2006 9:27 pm Post subject: Binary data using TQuery |
|
|
Hi-
I am trying to set binary data into a SQL Server 2000 database table. I'm
using a varbinary field in the database. I have not been having any luck in
trying to set the binary data in. Does anyone know how to do it?
I have tried TParam->AsString, but this will truncate the data inserted as
soon as a null character is found in the binary data. Attempted AsBlob, but
my 39 bytes turned into 255 when read out???
Any suggestions? I currently have my binary data stored in an AnsiString,
which handles binary data fine.
Thanks,
Mark |
|
| Back to top |
|
 |
Mark Brown Guest
|
Posted: Fri Jun 09, 2006 10:07 pm Post subject: Re: Binary data using TQuery |
|
|
I think I found a solution. I changed the database field to be of type
"image", and used AsBlob to set the data just fine. When I read the data
back out with AsString, everything is as it should be.
Hope this helps someone in the future,
Mark |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|