?
Solved

Data Type is not supported

Posted on 2009-02-11
4
Medium Priority
?
778 Views
Last Modified: 2013-11-10
Hi Experts,

I'm using Delphi 6. I'm trying to insert BLOB field into table DOCUMENTS in oracle database. But I have problem with message " Data Type is not support "

And how to insert a Long Raw Field into table?

Please help me on this.

Thanks so much.
MyADoTable.Open;
   MyADoTable.Insert;
   MyADoTable.FieldByName('MIME_TYPE').AsString := 'text/plain';
   MyADoTable.FieldByName('NAME').AsString := 'C:\data.txt';
   MyADoTable.FieldByName('DAD_CHARSET').AsString := 'ascii';
   MyADoTable.FieldByName('LAST_UPDATED').AsDateTime := NOW();
   MyADoTable.FieldByName('CONTENT_TYPE').AsString  := 'BLOB' ;
   MyADoTable.FieldByName('BLOB_CONTENT').SetFieldType(ftBlob);
TBlobField(MyADoTable.FieldByName('BLOB_CONTENT')).SaveToFile('C:\data.txt');
    MyADoTable.Post;
    MyADoTable.Free;

Open in new window

0
Comment
Question by:SVPIT
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 23609609
i would recommend get some better components ... www.devart.com -> Odac

and now for your problem:
you are using savetofile instead of loadfromfile ...
0
 
LVL 7

Expert Comment

by:tankergoblin
ID: 23619713
in insert use

insert into yourtablename value(EMPTY_BLOB);
returning blob into :blob


MyADoTable.FieldByName('CONTENT_TYPE').AsParamType  := ptInput;
MyADoTable.FieldByName('CONTENT_TYPE').AsBlobLocator.AsString  := 'BLOB';
0
 
LVL 7

Accepted Solution

by:
tankergoblin earned 2000 total points
ID: 23619801
sorry if insert u should use
parambyname
also u should return to content_type as below

insert into yourtablename (CONTENT_TYPE) value(EMPTY_BLOB);
returning CONTENT_TYPE into :CONTENT_TYPE


MyADoTable.ParamByName('CONTENT_TYPE').AsParamType  := ptInput;
MyADoTable.ParamByName('CONTENT_TYPE').AsBlobLocator.AsString  := 'BLOB';

0
 

Author Closing Comment

by:SVPIT
ID: 31545477
Thanks for your help
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question