PRB : Updating BLOB through ODBC to ORACLE - ODBC

Hi,
I am facing problem while updating BLOB data to oracle database
using ORACLE ODBC driver 8.01.06.00.
I am writing to the database using an application developed in
VC++ 6.0 using MFC.
The application throws an exception at
     AFX_ODBC_CALL(::SQLParamData(hstmt, &pv));
in function CRecordset::SendLongBinaryData.
It does not give any error string so to identify the error.
The same code works with MS Access 2000 database through ODBC
driver for Access.
The table to which the BLOB is written contains only two fields
namely a long id and the BLOB field.
Is there anything different required to be done?
Can anybody help me regarding this?
Thanks in advance.
Manish... 

Enable an ODBC trace in the ODBC administrator and see what (if
any) extra errors are uncovered there. 

Hi Manish,
Have you got the solution for your problem... I am also facing the similar problem
Pls. let me know.
Thanks,
Zahir 

Can you enable ODBC tracing and see what error shows up there?
What version of the Oracle ODBC driver are you using? Have you tried upgrading to the latest version?
Justin 

Hi,
Able to Read the BLOB using ODBC in Oracle 8.x and Able to read write BLOB using ODBC in Oracle 9.x. Oracle might have improved the driver.
/Zahir

Related

Migrate binary data from Informix to Oracle 9i

Hope some of you have experiences in migrating data from Infomrix into Oracle. Currently, we are using Informix IDS 7.31FC3. I'm looking for ways to migrate binary from Informix to Oracle using sqlldr. So far, I have not been able to do the loading. The binary data column is of type char(104). When that column was unloaded to a flat file, it contains non-printable characters. The delimiters were pipes, "|". The difficult part is the binary data sometimes also has pipes as valid data. I unloaded the data from an Informix database using a uitility, "dbaccess -X". Thanks. 
Have you looked into Oracle Migration Workbench? I'm not sure whether it supports Informix, but I think it does. It is available for download on OTN. 
Tried Migration workbench and got the following error:
"Failed to create tablespace: IO exception: Connection aborted by peer: Socket write error."
Do you know of any other tools? IDS 7.31FC3 --> Oracle 9i Release 2 (9.2.0.1)
Thanks,
James 
Hi James,
I am also facing the same problem of loading binary data(unloading from informix) to Oracle 9i.So if you get any hint or any solution to overcome this, please let me know also. pl post it in the forum. it would be of great help for me.
Regards,
Gopu

Toplink with CLOB

Hello All
I have a String type in the object model mapped to CLOB in the database. i use the Toplink developer preview 10.0.3.
I have the requirement of making my application work with both Oracle server and Oracle Lite. When working with the Oracle server Toplink is passing the value to CLOB as bind variable. However when working with Oracle Lite, toplink is passing the value to CLOB just as a string and i am getting an error here because i am inserting very large data. Any one has any idea? How can i make Toplink also pass the value to Oracle Lite CLOB as a bind variable. I use Oracle version 9i for both server and Lite.
Thanks in advance, 
It is odd that TopLink would do something different on Oracle vs Lite, are you using a different platform in each case?
In general to use binding for large strings you can enable string binding on your login.
i.e.
project.getLogin().useStringBinding(100);
Some JDBC drivers may have size limits for large strings, so you may want to ensure that it is possible through direct JDBC to store the size of CLOB that you require to your database.
Hi James
Thanks for the information. I use oracle.toplink.internal.databaseaccess.OraclePlatform for Oracle Lite and oracle.toplink.oraclespecific.Oracle9Platform for Oracle Server. I tried using the oracle.toplink.oraclespecific.Oracle9Platform for Oracle Lite, but i am getting Class Cast Exceptions.
However, your suggestion to use getLogin().useStringBinding() seems to work. I need to do further tests to be 100% sure.
Thanks again
Hello
I thought the problem is solved, but it is not the case.
getLogin().useStringBinding() enables me to put the data in the Oracle Lite database with the oracle.toplink.internal.databaseaccess.OraclePlatform but while retriving the data, i am just receiving the null back. I can check that the data is stored in odb file with the help of winSQL. The same code works perfectly fine with the Oracle Server.
Please help me if any one has any idea regarding this problem or any better way to store CLOB with oracle lite database.
Thanks in advance, 
Any body, any suggestions. I got stuck by this problem.
Thanks 
Sounds like the driver you are using for Oracle Lite does not support the size of CLOB you are writing. You might need to contact Oracle technical support or post to the Oracle database newsgroup. 
I am new to Toplink and I have the similar problem, I need t oupdate a big clob which can be a few mb in length using Toplink and using hte descriptor I am not sure how we can control that as toplink creates a SQL statement.
Please help!!!! 
Hello Mudit
I went to Metalink and they told me that Toplink is never tested with Oracle Lite. However with Oracle server and Toplink i do not face any problems in inserting or retrieving large CLOBs. Do not use the Thin Driver, but use OCI.
Regards 
Hi
Thanks for the information but for us we need to use the Thin driver as we have a J2EE application and using the standard.
Do you know how I can do it?
Thanks in advance.
Regards
Mudit

Regarding pulling data from sqlserver to ORacle

Hi, I want to pull data from sql server to oracle kindly let me know the procedure for doing the same with jdbc or OCI. Regards, Pradeep madhavan
Hi,
I want to pull data from sql server and put the same date to oracle
i would like to know anyother option is their apart from using dblinks with transparent gateways
kindly help in finding a method to get the data frm sqlserver to oracle.
Regards,
Pradeep madhavan 
Hi,
you can code a java program with two connections one that reads data from sqlserver and one the inserts the data into Oracle.
IIRC there is a free jdbc driver for sqlserver, so you can find all the jdbc drivers at no cost.
ciao,
Giovanni 
Hi Giovanni,
I have found by configuring Linked server set up between oracle and sqlserver we can this possible.
If so , kindy provide the document for configuring linked server.
Regards,
Pradeep madhavan 
Hi,
you can download the jdbc sqlserver free driver at http://jtds.sourceforge.net/
the oracle jdbc driver can be found here http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
You must write a program that connects to sqlserver and connects to oracle and reads data from one database and insert into the other one using the jdbc api.
ciao,
Giovanni

SQL Warning - Data truncated

Hi,
I am using a tool to export data from .dbf file to .dat file.
While exporting I am getting the following warning,
"SQL Warning, SQL State 01004, 0, [Sybase][ODBC Driver]Data truncated"
Truncation of data happens for Long datatype only.
How can I export data including of type Long to a file without truncation.
Can anyone help to solve this. If any additional information needed pl tell me.
Yar 
What tool do you use ? Is it related to Oracle ?
Nicolas. 
I am using 'dataexp' provided by Siebel (my database is Oracle10g). 
Check out the ODBC FAQ, there are a couple of issues dealing with LONG
http://www.oracle.com/technology/software/tech/windows/odbc/htdocs/ODBCFAQ.pdf 
Sorry, I don't relevant information from that, anyway Thank you very much for help.
But still I am looking for a solution. Can anyone give some tips. 
You are using a Siebel product with a Sybase ODBC driver. Without an Oracle Error number in order for us to determine what the underlaying Oracle problem is (if any), how do you expect us to help?
This forum is about SQL and PL/SQL - not about Oracle database utilities and Oracle db admin, never mind about Siebel and Sybase and ODBC.
What you can do is enable (if it exist) a debug trace parameter for the ODBC driver. This should list all ODBC calls made with full db interaction details - and this should include the OCI (Oracle Call Interface) calls made and response codes returned by the OCI client driver. 
Thanks.

JDBC with oracle 8.1.6

Hi ,
iam using oracle 8.1.6 . I want to pass an xml file as a clob to database
through Java pl/sql procedure.Iam using setAscii stream function to pass the clob as param from java. When the size of the xml is more than 32 kb.
iam getting an exception
SQL exception: java.sql.SQLException: Data size bigger than max size for this type: 32922
Using clobs we should be able to support 4gb of data?Does Oracle 8.1 support this? Is there any restriction on Clobs in oracle 8.1?
Can you please help me how I should tackle this problem.
Thanks
Chaitanya 
Try using the latest drivers (10.2); the following blog entry
http://db360.blogspot.com/2006/11/get-bolder-with-lobs-manipulation-in.html#links
might also help.
Kuassi 
My java application is inside the database oracle 8.1. Is it feasible to use oracle 10 driver?is the driver compatible?
is theere any restriction as passing parameters to Pl/SQL procedure specifically with oracle 8.1?
please confirm.

Categories

Resources