Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
blobfield.LoadFromStream error |
Tue, Feb 9 2010 5:15 PM | Permanent Link |
"Eric Schwarz" | This is driving me crazy because I know I've done this in the past.
I'm trying to load a blob field with a jpg image via a memory stream. Image.LoadFromFile Image.SaveToMemoryStream(Stream) Blob.LoadFromStream(Stream) An EInvalidGraphic "Bitmap image is not valid" exception is thrown on the LoadFromStream. What's going on here? I thought you can load anything into a blob field? 4.29 under Delphi2010 |
Tue, Feb 9 2010 5:58 PM | Permanent Link |
"Walter Matte" | Off the top of my head...don't you have to Position the Stream ... or isn't
there a Blob.LoadFromFile .... I didn't research... Walter Image.LoadFromFile Image.SaveToMemoryStream(Stream) Stream.Position := 0; Blob.LoadFromStream(Stream) -------------------------------- OR -------------------------- Blob.LoadFromFile "Eric Schwarz" <eric@HATE-THAT-SPAMcomputer-strategies.com> wrote in message news:51FD48C5-F798-4F24-A46E-1EBED6C9BD71@news.elevatesoft.com... > This is driving me crazy because I know I've done this in the past. > > I'm trying to load a blob field with a jpg image via a memory stream. > > Image.LoadFromFile > Image.SaveToMemoryStream(Stream) > Blob.LoadFromStream(Stream) > > An EInvalidGraphic "Bitmap image is not valid" exception is thrown on the > LoadFromStream. What's going on here? I thought you can load anything > into a blob field? > > 4.29 under Delphi2010 > > |
Tue, Feb 9 2010 6:00 PM | Permanent Link |
"Walter Matte" | DO you have the field attached to a data aware control???
It that what is causing the exception.... it wouldn't be the DB. Walter "Eric Schwarz" <eric@HATE-THAT-SPAMcomputer-strategies.com> wrote in message news:51FD48C5-F798-4F24-A46E-1EBED6C9BD71@news.elevatesoft.com... > This is driving me crazy because I know I've done this in the past. > > I'm trying to load a blob field with a jpg image via a memory stream. > > Image.LoadFromFile > Image.SaveToMemoryStream(Stream) > Blob.LoadFromStream(Stream) > > An EInvalidGraphic "Bitmap image is not valid" exception is thrown on the > LoadFromStream. What's going on here? I thought you can load anything > into a blob field? > > 4.29 under Delphi2010 > > |
Tue, Feb 9 2010 7:56 PM | Permanent Link |
"Eric Schwarz" | THAT's the ticket!!! I had 2 controls attached to it and I didn't
disconnect one of them for testing. I KNEW it was something stupid, thanks for the second set of eyeballs "Walter Matte" <mattew_@_interlog.com> wrote in message news:87F0F53C-EC54-41FF-BE76-F8C9F3EAC23F@news.elevatesoft.com... > DO you have the field attached to a data aware control??? > > It that what is causing the exception.... it wouldn't be the DB. > > Walter > > > > "Eric Schwarz" <eric@HATE-THAT-SPAMcomputer-strategies.com> wrote in > message news:51FD48C5-F798-4F24-A46E-1EBED6C9BD71@news.elevatesoft.com... >> This is driving me crazy because I know I've done this in the past. >> >> I'm trying to load a blob field with a jpg image via a memory stream. >> >> Image.LoadFromFile >> Image.SaveToMemoryStream(Stream) >> Blob.LoadFromStream(Stream) >> >> An EInvalidGraphic "Bitmap image is not valid" exception is thrown on the >> LoadFromStream. What's going on here? I thought you can load anything >> into a blob field? >> >> 4.29 under Delphi2010 >> >> > > |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |