Click to See Complete Forum and Search --> : Unable to insert into CLOB
theSagacious
04-13-2007, 04:39 PM
Hi,
I am trying to insert a large text(article collected from a webpage)to a table with CLOB column. But whenever I try to insert the text, it gives me the following error:
[ODBC 08S01]: [Microsoft][ODBC driver for Oracle][Oracle]ORA-03113: end-of-file on communication channel: [ODBC 01004]: [Microsoft][ODBC driver for Oracle]Data truncated .
The text has 2314 characters in it.
Should I use a different data type or what is the cause for tha above error?
Thanks!
Under 4K you shouldn't have any problems...
At first glance it looks like your issue is ODBC driver related rather than backend related.
Would you mind in sharing your insert statement and a brief description of your environment?
theSagacious
04-13-2007, 05:15 PM
The insert statement is from the Back End which is a third-party software which collects data from websites using SQL-like queries. After collecting the data (article) I am trying to post it to Oracle table.
The statement looks something like this :
select body as article
into samp@'odbc:Driver=Microsoft ODBC for Oracle;Server=serverName;Uid=username;Pwd=password;'
where samp is the table name,
article is the column in the table with the datatype as CLOB
Thanks!
Ok... assuming you can normally connect to the database and select/insert non-LOB data... you have a driver issue.
Go to Oracle web site and get the newest ODBC driver you can find.
Driver should have an "Enable LOBs" checkbox in the ODBC Manager driver configuration window
theSagacious
04-13-2007, 06:37 PM
I downloaded the ODBC Driver for Oracle 9i . But when I ran the .exe it just extracted to a folder with 3 dll files.
Where should I find the window which you had mentioned in your previous post?
Also, I read an article from Oracle about ODBC working with Third-party tools:
http://www.oracle.com/technology/software/tech/windows/odbc/htdocs/ODBCFAQ.pdf
which says ,
The Oracle 8.0.4 ODBC driver was the first version supplied by Oracle that conformed to the ODBC version 3 API specification. The drivers released prior to this ODBC API only supported level 2 compliance of the version 2.5 specification. The first versions of this driver allowed READ accesses to the new LOB column data types in Oracle 8. Starting with version 8.0.5.1.x, write access was also allowed10. In order to access the LOB data types you simply bind them as the appropriate ODBC data type (LONG VARCHAR, LONG VARBINARY) as you would LONG or LONG RAW columns, or use the new ODBC API data types that Oracle registered with Microsoft11 (BLOB, CLOB). [Note: A SQLDescribeCol may report the new data types] These new data type
declarations should be included with the MDAC 2.0 and later releases from Microsoft, but for compatibility, you should simply use the appropriate LONG VARxxxx type.
Does this mean I can only use LONG (which actually works out for me,but I am concerned about articles which will be more than 4k) ?
Thanks!