Re: JPEG Pictures in ADO



Oops - Yes I had.

And now it works

Thank you so much
- Anders

"Viatcheslav V. Vassiliev" <support@xxxxxxxxxxxxxxx> skrev i en meddelelse
news:4355ecdd@xxxxxxxxxxxxxxxxxxxxxxxxx
> You probably have TDBImage or another control attached to this field.
>
> //------------------------------------------
> Regards,
> Vassiliev V. V.
> http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> ADO.Net
> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
>
> "Anders Balslev" <ab@xxxxxxxxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
> news:4355e994$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> > Thank you - however, unfortunately, it did not succeed
> > My native DB is MSSQL server (2000)
> > In this I have created a table, with a field intended to hold the JPEG
> > image
> > If I in the DB define the field as "Image", The ADO table translates
it -
> > as
> > expected - as a TBlobField (when it is imported as a persistant field).
> > When the piece of code runs, following errormessage appear:
> > - "Bitmap Image is not valid"
> >
> > I then try to define the native fieldtype as "Binary". Here the ADO
table
> > translates it into a TBytesField.
> > TBytesField and TBlobField are incompatible, and attempting to run the
> > piece
> > of code, raises the exception "Invalid Typecast"
> >
> > What can I do??
> > - Anders Balslev
> >
> > "Brian Bushay TeamB" <BBushay@xxxxxxxxx> skrev i en meddelelse
> > news:7tebl11u68vl4qj7q6fddnv0vvi0bnbuq0@xxxxxxxxxx
> >>
> >> >Can anyone make a small piece of code thet stores the JPEG Image in a
> > field
> >> >(field type??) in a table.
> >> >Assume the image is located at:
> >> >C:\My Documents\Pictures\MyPicture.JPG
> >> >Apparently, DBImage work only on BITMAP (?) which consumes huge amount
> >> >of
> >> >memory/disk space
> >>
> >> with yourDataset do begin
> >> Edit;
> >> (fieldbyName('YourJpegField') as Tblobfield).loadfromFile('C:\My
> >> Documents\Pictures\MyPicture.JPG');
> >> Post;
> >> end;
> >> end;
> >> --
> >> Brian Bushay (TeamB)
> >> Bbushay@xxxxxxxxx
> >
> >
>
>


.



Relevant Pages

  • Re: DateTime Picker
    ... > update the property on the form, you'd also need to refresh the control. ... > LOCAL cCS ... >> I didn't quite understand Anders example. ... >>>>> date field is NULL or EMPTY, or less than the MinDate property. ...
    (microsoft.public.fox.programmer.exchange)
  • HP Scopelink software - How to locate a copy
    ... I'm looking for the now obsolete HP Scopelink software to control ... oscilloscopes, amd upload screen dumps. ... Anders J ...
    (sci.electronics.equipment)
  • Re: integrating MS Word into my application!
    ... VC ActiveX Control for Hosting Office Documents in VB/IE ... Use the WebBrowser Control to Open an Office Document ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Id is changed on my server control! (_ctl5)
    ... If you use the control in a repeater, datalist or datagrid control it is ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Get name of textboxcontrol programmatically
    ... YouŽll have to explain that the control is not just a Control. ... It is in fact a textbox and you do that by a typecast. ... Anders ...
    (microsoft.public.dotnet.framework.compactframework)