scotdance
asked on
Saving Images to SQL Server using BDE.
Hi
I'm trying to save an picture to an SQL Server database from delphi using a BDE TTable component to connect to the database, and a TDBImage to view the image.
When i add the database filed to the fields editor for the TTable it appears as a TBlobField with the Blobtype set as ftBlob, i have changed this to a ftGraphic and still get the following error.
when i save to the database i get the following error:
'Invalid Blob Length'
Cheers
I'm trying to save an picture to an SQL Server database from delphi using a BDE TTable component to connect to the database, and a TDBImage to view the image.
When i add the database filed to the fields editor for the TTable it appears as a TBlobField with the Blobtype set as ftBlob, i have changed this to a ftGraphic and still get the following error.
when i save to the database i get the following error:
'Invalid Blob Length'
Cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I thought a DBImage could display other graphic formats, as long as these formats were registered within Delphi? I might be mistaken, though.
>I thought a DBImage could display other graphic formats
sure it can, but it cannot determine what graphic is to display.
usual it is bound on a ftGraphic-type. this type is delphi specific
and uses a longint-prefix (four bytes) for identifying the graphic-type
(this is based on d5, maybe d7 supports jpg also)
meikl ;-)
sure it can, but it cannot determine what graphic is to display.
usual it is bound on a ftGraphic-type. this type is delphi specific
and uses a longint-prefix (four bytes) for identifying the graphic-type
(this is based on d5, maybe d7 supports jpg also)
meikl ;-)
ASKER
sorry about the delay in getting back to you about this, it was put on a back burner while i worked on some other stuff.
and now the client has changed what they want too, isn't that what always happens, lol
They now want me to copy images from one database to another, the program has to
be able to go both ways
I.e. from MS SQL Server to Paradox, SQL to SQL, Paradox to SQL and Paradox to Paradox.
I can get it to copy most of the pictures but when I go from Paradox to SQLServer I get an error saying ' Invalid BLOB
Length '.
The image type that I use is a JPEG image, but I also get this error with BMP files too.
Anyone got any suggesting on how to fix this problem.
Thanks
and now the client has changed what they want too, isn't that what always happens, lol
They now want me to copy images from one database to another, the program has to
be able to go both ways
I.e. from MS SQL Server to Paradox, SQL to SQL, Paradox to SQL and Paradox to Paradox.
I can get it to copy most of the pictures but when I go from Paradox to SQLServer I get an error saying ' Invalid BLOB
Length '.
The image type that I use is a JPEG image, but I also get this error with BMP files too.
Anyone got any suggesting on how to fix this problem.
Thanks
ASKER
Thanks for the help folks, don't need to answer anything about the copying of images as i managed to get this to work.
Thanks again
Thanks again