Board index » delphi » Invalid class typecast
Rodrigo C Souza
Delphi Developer |
Tue, 20 Sep 2005 05:32:52 GMT
|
Rodrigo C Souza
Delphi Developer |
Tue, 20 Sep 2005 05:32:52 GMT
Invalid class typecast
Hi all!!!
When I try to load or save a binary data to blob field, I get this error: I'm using D7, FireBird 1.04, the blob's field type is 0 and I have a lot of Thanks, Rodrigo. |
Richard Gilber
Delphi Developer |
Tue, 20 Sep 2005 03:20:57 GMT
Re:Invalid class typecastI am successfully working blobs with dbExpress/Firebird. my blob is currently defined as BLOB SUB_TYPE BLR SEGMENT SIZE 1, but I do not know if that is best. QuoteRodrigo C Souza wrote: |
Martijn Tonie
Delphi Developer |
Tue, 20 Sep 2005 03:32:19 GMT
Re:Invalid class typecastQuote> I am successfully working blobs with dbExpress/Firebird. of code? -- With regards, Martijn Tonies See you at the First European Firebird Conference in May in Fulda, Germany Quote
|
Rodrigo C Souz
Delphi Developer |
Tue, 20 Sep 2005 09:48:16 GMT
Re:Invalid class typecastOf Course, here it goes: procedure TForm1.Button1Click(Sender: TObject); Error here>>>> MyBlobStream := MyFileStream := TFileStream.Create('C:\temp_file.mp3', fmCreate or On this table I'm saving some MP3 files. When I try to save the file using And I would like to complete my question asking to Richard Gilbert what kind Thanks for help, Rodrigo C. Souza Quote"Martijn Tonies" <m.tonies@upscene!nospam!.com> wrote in message Quote> > I am successfully working blobs with dbExpress/Firebird. |
Martijn Tonie
Delphi Developer |
Tue, 20 Sep 2005 15:06:59 GMT
Re:Invalid class typecastHi, Quote> procedure TForm1.Button1Click(Sender: TObject); (You can, amongst other ways, simply do this by: ShowMessage(SQLQuery1.FieldByName('MyFileOnDataBase').ClassName); ) Quote> MyFileStream := TFileStream.Create('C:\temp_file.mp3', fmCreate or TEXT (1) and BINARY (0). In subtype 0 you can put anything you like (in 1 also, but hey - it's the standard). If you're using BLR, better not. -- With regards, Martijn Tonies See you at the First European Firebird Conference in May in Fulda, Germany |
Rodrigo C Souz
Delphi Developer |
Sun, 25 Sep 2005 01:11:37 GMT
Re:Invalid class typecastHi Martijin, Thanks for help!! :-) The BLR blob type was mencioned by Richard Gilbert in his message. I was Bye, Rodrigo C. Souza. Quote"Martijn Tonies" <m.tonies@upscene!nospam!.com> wrote in message Quote> Hi, |
2. IDispatch - Invalid class typecast error ??
3. Invalid Class Typecast!!help
5. Blob => Invalid class typecast?
6. (Owner as TMyForm) - Why "Invalid Class Typecast"?
7. Invalid Class Typecast on components with a property type TStrings.
8. EInvalidCast 'Invalid class typecast'. with Rave Reports (Delphi 7 Bundeled)