ORA-1483 Using database type LONG, HELP!
Running on WINNT 4.0, JDK 1.2
When attempting to update a column of type LONG the following
error is being recieved:
java.sql.SQLException: ORA-01483: invalid length for DATE or
NUMBER bind variable
The sql statement is:
UPDATE FSC_HELP_ITEM_DATA SET DATA_OBJ = ? WHERE DATA_ID = ?
Where Data_OBJ is the LONG, and is being set from a String using
setString()
and Data_ID is NUMBER, and is being set from an int with
setInt();
The error occurs when the length of the String is greater than
2000 characters in length.
I have tried setMaxFieldSize(), but not luck there.
I have also tried:
((OracleStatement)stmt).defineColumnType( 1,Types.LONGVARCHAR )
But no luck there either.
NOTE: I do not get the error when inserting the same data values
in a similar fashion
null
I have establishing an Thin connection to a 7.3.4.0.0 database.
The code that performs the update is:
sqlCommand = "UPDATE FSC_HELP_ITEM_DATA SET DATA_OBJ = ?
WHERE DATA_ID = ?";
stmt = DbConnect.conn.prepareStatement( sqlCommand );
stmt.setString( 1, htmlData );
stmt.setInt( 2, newDataId );
stmt.executeUpdate();
stmt.close();
htmlData is type String
newDataId is type int
The table FSC_HELP_ITEM_DATA is:
Name Null? Type
DATA_ID NUMBER
DATA_TYPE CHAR(1)
DATA_OBJ LONG
JDeveloper Team (guest) wrote:
: Hi Paul,
: A few questions to help us track this down:
: 1. what version of the database are you running against?
: 2. where is this update taking place (via an Infobus data form
: you created with the wizard, or from SQLJ or JDBC code that you
: wrote)?
: I'm assuming the latter for #2. If so, could you provide a
: snapshot of the code?
: Thanks.
: -L
: Paul Lawton (guest) wrote:
: : Running on WINNT 4.0, JDK 1.2
: : When attempting to update a column of type LONG the following
: : error is being recieved:
: : java.sql.SQLException: ORA-01483: invalid length for DATE or
: : NUMBER bind variable
: : The sql statement is:
: : UPDATE FSC_HELP_ITEM_DATA SET DATA_OBJ = ? WHERE DATA_ID = ?
: : Where Data_OBJ is the LONG, and is being set from a String
: using
: : setString()
: : and Data_ID is NUMBER, and is being set from an int with
: : setInt();
: : The error occurs when the length of the String is greater
than
: : 2000 characters in length.
: : I have tried setMaxFieldSize(), but not luck there.
: : I have also tried:
: : ((OracleStatement)stmt).defineColumnType( 1,Types.LONGVARCHAR
: : But no luck there either.
: : NOTE: I do not get the error when inserting the same data
: values
: : in a similar fashion
null
Similar Messages
-
Asking help Urgently..
We need to create a DB link from 7.3 to 10g. After initial problems, the DB link is finally established and we can query and do DML on the 10g DB from 7.3. using SQLPLUS.
Now the problem: We want to create triggers on tables in 7.3 DB to insert the same rows in 10g DB using the DB Link. The moment we create the trigger the connection is dropped with the error: ORA-03113: end-of-file on communication channel. We tried to write the insert statement inside a procedure/function but still the same problem.
Please help as we are desperate to find a solution for the said problem. The objective is to be able to insert a row in 10g (DB Linked) Database based on a trigger fired in 7.3 Database (Reference DB). Any help will be appreciated.
Thanks and regards.
Rajeev.I know that 7.x to 10g is not supported officially and should not be used in production environment.
But in our case, we need it for a short duration (duration of Parallel run) and my query is that, if I am able to do inserts from the SQLPLUS using the said DB Link, then why this cannot be done thru a procedure or a trigger.
if anyone has an explanation or workaround, it will be great.
Rajeev. -
ORA-39112: Dependent object type OBJECT_GRANT - using Datapump
Hi, all.
I am importing full database from 10g to 11g, using datapump:
impdp system/aroeira directory=DATA_PUMP_DIR full=y dumpfile=saodlx_full.dmp logfile=saodlx_full_imp.log PARALLEL=6
I got error message below with partitioned table:
ORA-39112: Dependent object type OBJECT_GRANT:"SHR04" skipped, base object type TABLE:"SHR04"."SHR04_ARMAZENAGEM_DTL" creation failed
ORA-39112: Dependent object type OBJECT_GRANT:"SHR04" skipped, base object type TABLE:"SHR04"."SHR04_ARMAZENAGEM_DTL" creation failed
ORA-39112: Dependent object type OBJECT_GRANT:"SHR04" skipped, base object type TABLE:"SHR04"."SHR04_ARMAZENAGEM_DTL" creation failed
ORA-39112: Dependent object type OBJECT_GRANT:"SHR04" skipped, base object type TABLE:"SHR04"."SHR04_ARMAZENAGEM_DTL" creation failed
ORA-39112: Dependent object type OBJECT_GRANT:"SHR04" skipped, base object type TABLE:"SHR04"."SHR04_ARMAZENAGEM_DTL" creation failed
ORA-39112: Dependent object type OBJECT_GRANT:"SHR04" skipped, base object type TABLE:"SHR04"."SHR04_ARMAZENAGEM_DTL" creation failed
Please, anybody can help me?
Thanks in advance.
Leonardo.Which exact versions are you dealing with?
There are a couple of MOS notes about this topic: *Compatibility Matrix for Export And Import Between Different Oracle Versions [ID 132904.1]* and *Export/Import DataPump Parameter VERSION - Compatibility of Data Pump Between Different Oracle Versions [ID 553337.1]*
It is recommended that both databases have the latest patchset installed.
Also, you can troubleshoot the issue generating an SQL file with tables creation for the original dump (SQLFILE parameter to impdp), and extract and create those tables alone to see if there is something wrong there.
Regards.
Nelson -
Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI)
Hi there,
I have a rather interesting / complex problem......creating a connection to CA-IDMS from Tomcat using JDBC type 4 drivers (CA provide the type 4 driver).
We have a zSeries 9 IBM mainframe running CA-IDMS r16.1, and I need to connect to the IDMS from Tomcat (running on Linux) using the JDBC Type 4 drivers provided by CA.
At this stage I am struggling with the actual setup and configuration of Tomcats server.xml and web.xml files. These are the files where the JDBC configuration is set (I think). I have to setup the CA-IDMS part of the configuration, but that is a different problem. Basically there is a TCP/IP listener on the IDMS, waiting for incoming connections from the JDBC type 4 driver.
I set up a Tomcat to MySQL connection using MySQL Connector / J, which is a similar kind of process to what I am trying to achieve with IDMS. MySQL connector / J came with a jar file which is placed in Tomcats lib folder, and then the JDBC setup for the web application is created in Tomcat's server.xml and web.xml files. You can then connect to the MySQL database using JSP and the configured JDBC driver / connection. The CA-IDMS Server comes with an idmsjdbc.jar file, which I think is the JDBC typr 4 driver. I think it needs to be placed in the Tomcat /lib folder, but I dont know how to set up the configuration.
There is a JDBC DriverManager which allows JDBC drivers to connect to CA-IDMS. The DriverManager recognises the following syntax:
jdbc:idms://hostname:port/database
This allows the JDBC driver running within Tomcat to connect to the IDMS which is running on the IDM mainframe. CA IDMS r16 supports direct connections from the Type 4 JDBC driver to the Central Version on IDMS. "hostname" is the DNS name or IP address of the machine where the CV is running, and "port" is the IP port that was specified for the listener PTERM (setup on the IDMS side).
There is a caidms.properties file for the JDBC driver, which is used to specify user ID, password, and optional accounting information. It can also be used to specify physical connection information, allowing an application to connect to a CA-IDMS database without requiring the definition of an ODBC style data source. However, I dont know where to place this file within the Tomcat setup.
There is also an IdmsDataSource class. I dont know where to configure this or how to set it up; the CA-IDMS Server manual states the following:
This class implements the JDBC DataSource interface. It is used with an application server (Tomcat) providing Java Naming and Directory Interface (JNDI) naming service to establish a connection to a CA IDMS database. IdmsDataSource properties conform to the Java Beans naming conventions and are implicitly defined by public setter and getter methods. For example, the description property, which is required for all DataSource implementations, is set using the setDescription(String) method. The application server may use the java.lang.reflection methods to discover DataSource properties and provide an interface to set them, or may simply require that they are defined in some configuration file. IdmsDataSource properties are used to specify the connection parameters. These properties are the equivalent of the DriverPropertyInfo attributes described in the previous section and can be used to completely define the parameters needed to connect to a database. Like a URL, an IdmsDataSource object can also reference an ODBC style data source name, where the connection parameters are defined in the configuration file on Linux.
Is there anyone that can try to point me in the right direction to setting up the JDBC connection? I am totally new to Java and so the instructions are not making much sense at the moment. Any help, hints, tips ..anything will be greatly appreciated as I have just hit a brick wall here. I can't find much to do with setting up the CA-IDMS Server JDBC type 4 driver online either....if anyone can point me to some resources that would also be extremely useful.
Kind regards
JpYou say you've managed to get the JDBC driver working
in an application but not in a JSP. You also say that
the error you get is
"com.microsoft.jdbc.sqlserver.SQLServerDriver".
I'd be willing to bet that the exception that you have
got is a ClassNotFoundException. I.E. your application
server hasn't found the JDBC driver classes. The
application server probably doesn't use your current
CLASSPATH to look for classes. It will be setup within
the application server in some way and you'll need to
check your app server documentation to see how it is
done.
Try replacing
e.printStackTrace();with
e.printStackTrace(out);to get a full stack trace of your error.
ColTried it. Got this error when I tried to run the JSP.
Incompatible type for method. Can't convert javax.servlet.jsp.JspWriter to java.io.PrintWriter.
e.printStackTrace(out);
I'm currently using Apache Tomcat 4.0.3 as my JSP/Servlet Container.
I'm also using Type 4 MS SQL Server 2000 JDBC driver version 2.0 on my NT4.0 Server.
Do I need to set my JDBC driver in my container? if so, how do I do that? -
Using clobs and ORA-01704: string literal too long
Hi,
I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
I still receive the error
java.sql.SQLException: ORA-01704: string literal too long
I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
Any advice you have here is greatly appreciated.
Thanks,
JoeHi,
I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
I still receive the error
java.sql.SQLException: ORA-01704: string literal too long
I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
Any advice you have here is greatly appreciated.
Thanks,
Joe -
Help me! ORA-01172 during database startup,and I can't recover it
Hi,
I use oracle 7.3.4.0.0 on Windows 2000 Adv server. My Cluster met some problem, the clustsvc quit unexpectedly,and cluster admin application hang, so I restarted the computer. But after I restart,I can't start my ORACLE_SID, I met ORA-01172, Instance recover stuck at block 49, file #1,can't aplly change SCN 0000000.0a435675,it isnot the next change,...ORA-00600 ....... My DB is NOARCHIVELOG, and file #1 is SYSTEM tablespace, and I have no recent copies of these datafiles. So I can't recover from the problem. I use dbverf73 checked all the datafiles, they all have no corrupt blocks. How can recover the database?
Please help me! A lot of thanks!Check Oracle support for the ORA-00600 error.
Recover a database without ARCHIVELOG and without a cold backup is impossible as far as i know...
Fred -
Insert data 32K into a column of type LONG using the oracle server side jdbc driver
Hi,
I need to insert data of more than 32k into a
column of type LONG.
I use the following code:
String s = "larger then 32K";
PreparedStatement pstmt = dbcon.prepareStatement(
"INSERT INTO TEST (LO) VALUES (?)");
pstmt.setCharacterStream(1, new StringReader(s), s.length());
pstmt.executeUpdate();
dbcon.commit();
If I use the "standard" oracle thin client driver from classes_12.zip ("jdbc:oracle:thin:@kn7:1521:kn7a") every thing is working fine. But if I use the oracle server side jdbc driver ("jdbc:default:connection:") I get the exception java.sql.SQLException:
Datasize larger then max. datasize for this type: oracle.jdbc.kprb.KprbDBStatement@50f4f46c
even if the string s exceeds a length of 32767 bytes.
I'm afraid it has something to do with the 32K limitation in PL/SQL but in fact we do not use any PL/SQL code in this case.
What can we do? Using LOB's is not an option because we have client software written in 3rd party 4gl language that is unable to handle LOB's.
Any idea would be appreciated.
Thomas Stiegler
nullIn rdbms 8.1.7 "relnotes" folder, there is a "Readme_JDBC.txt" file (on win nt) stating
Known Problems/Limitations In This Release
<entries 1 through 3 omiited for brevity >
4. The Server-side Internal Driver has the following limitation:
- Data access for LONG and LONG RAW types is limited to 32K of
data. -
IPad mini now terrible to use, apple support no help because warranty is up. All cause by new ios8 update, wifi issues, many apps no longer work, apps that do work now crash regularly and sometimes take several instances and reboots to even open.
need help uninstalling ios8 and going back to 7 where things worked please.
-
Adobe flash CS6 crashes when using the type tool or Editing word all the time... please help!
Nobody can tell you anything without proper system info or other technical details. The standard answer with all text issues simply is, that you have a "bad font" on your system and need to get rid of it.
Mylenium -
Photoshop CS6 crashes all the time and especially when using the type tool... please help!
Since I did not have this problem with CS5 or CS4, I can only assume something is not right with Photoshop CS6... below is my video card info:
ATI Radeon HD 4850:
Chipset Model: ATI Radeon HD 4850
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: ATI (0x1002)
Device ID: 0x944a
Revision ID: 0x0000
ROM Revision: 113-B9110C-425
EFI Driver Version: 01.00.383
Displays:
iMac:
Resolution: 2560 x 1440
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Built-In: Yes
Connection Type: DisplayPort
Cinema HD:
Resolution: 1920 x 1200
Pixel Depth: 32-Bit Color (ARGB8888)
Display Serial Number: 2A80273WXMN
Mirror: Off
Online: Yes
Rotation: Supported -
How to use a vector to navigate my database? please help me.. ty
how to use a vector to navigate my database? please help me.. ty
Quite unclear request�
Can you provide more details? -
How do I detect which database type user is using?
I am using the JDBC-ODBC bridge, and due to limitations of text driver (no getDate for example), I need to know how to read certain fields in. I need to know for any particular run which type of database the user specified.
Does anyone have a simple way to know what type the database is?
Thanks,
JennyWhen I see questions that want to know the particular environment, whether it be the platform running on, or the database type, or what-have-you, it is a red flag to me. I would suggest you code it with ANSI-standard SQL if at all possible to remove any such dependencies.
-
Is there any advantage to use database helper class
Is there any advantage to use database helper class ( e.g. database.bookDB in Duke's bookstore)in servlet design? What if I setup a DB connection for every servlet?
If there is not much relation between servlets.For example one servlet working on authentication againist user name/password in database another one work on searching book by keywords?
and if we want to have servlets written by difference programmers? -
Help in using record type and object type
Hi Experts,
I am new to object types and record types.
I want to return the output of this query using one OUT parameter
from the procedure using RECORD type or OBJECT type.
with out using refcursor.
SELECT empno,ename,sal FROM emp WHERE deptno=30;
Let us assume the query is returning 50 records.
I want to send those 50 records to OUT parameter using record type or object type.
Please provide the for the requirement code using RECORD TYPE and OBJECT TYPE separately.
Your earliest response is appreciated.
Thanks in advance.Hi All,
I have tried this.But it ising not work
CREATE OR REPLACE PACKAGE maultiplevalues_pkg
IS
TYPE t_record IS RECORD
(empno emp.empno%TYPE,
ename emp.ename%TYPE,
sal emp.sal%TYPE);
V_RECORD t_record;
TYPE t_type IS TABLE OF V_RECORD%TYPE;
PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
dept_result OUT t_type);
END;
CREATE OR REPLACE PACKAGE body maultiplevalues_pkg
IS
PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
dept_result OUT t_type)
is
begin
dept_result :=t_type();
for I in(
select EMPNO,ENAME,SAL from EMP WHERE deptno=p_deptno
LOOP
dept_result.extend;
dept_result(i).empno :=i.empno;
dept_result(i).ename :=i.ename;
dept_result(i).sal :=i.sal;
END LOOP;
END;
END;
Please help me OUT return multiple values through single OUT variable in a procedure.
Thanks. -
Help needed: modeling master-detail relationship using Object types
I would like to use object types to model a master-detail relationship. For e.g.
create or replace type detail_t as object
(id number,
name varchar2(20)
create or replace type details_t as
table of detail_t
create or replace type master_t as object
(id number,
name varchar2(20),
details details_t
If I don't use database object-tables, how can I return multiple master rows of the type above from a PL/SQL procedure? Can I return a cursor of some sort?
I'm using Oracle 8.1.7.
Thanks,
NiranjaNiranjan,
After the object types are defined, your data would come from either object tables or object views. In your case, to get multiple master rows, simply query the object view.
Regards,
Geoff
Maybe you are looking for
-
Hello, I shot a sequence of photos for a stopmotion and have been having issues with color. It was shot on a green screen and so I used keylight to remove it, made the sequence, it all looks fine in AE, render it and when I open it afterward, t
-
Have any doby ever got this error message:When creating a new application JVMXM008: Error occured while initialising System ClassException in thread "main" error: 1054003 Error 1200442 loading application: java Virtual Machine errorThanks in advance
-
Function "DDIF_NAMETAB_GET"
Hi, I am reading a database table's attributed using DDIF_NAMETAB_GET function. My code is: DATA: IO_TABLE_NAME TYPE tabname, it_dfies TYPE TABLE OF dfies, is_dfies TYPE dfies. DATA: is_x030l TYPE x030l. *IO_TABLE_NAME is getting from user CALL
-
Audio goes off when iPad goes sleep (youtube)
Is it possible to listen music from youtube (safari) so that the music doesn't stop when iPad shuts off its screen? I'm using youtube to play music to my computer through Airplay and it ***** that I have to keep the iPad on all the time because if th
-
I have searched all over the place... will Tiger show a preview icon for PDF files? I only get an Adobe PDF icon, there is no preview thumbnail. I have Adobe CS Pro installed. Thank you in advance for any suggestions. shawnotay