How to submit a long character to Oracle8 with JSP (about 15,000 words)?

xiaoxiao2021-03-06  93

I use Oracle to do a database, using JSP to edit a general article management system, but the data item stored in the article doesn't know what type is good. I started using Varchar (2), but I can't exceed 4000 bytes, that is, 2000 I can't meet the needs. I know that mysql has a text type, but oracle doesn't know what to do?

Some people say that Long can, but I tried it, no!

-------------------------------------------------- -------------

Use long, I have source code. Take a look at the code below:

PreparedStatement PSTMT = Conn.PrepareStatement ("INSERT INTO TABLENAME (" INSERT INTO TABLENAME ("INSERT INTO TABLENAME (COLUMN1) VALUES (?)");

BYTE [] BYTES_ZYJS = longstr.getbytes ();

BYTEARRAYINPUTSTREAM Baisss = New ByteArrayInputStream (Bytes_zyjs);

InputStreamReader Bais = New InputStreamReader (Baisss);

PSTMT.SetCharacterstream (1, bais, bytes_zyjs.length);

PSTMT.ExecuteUpdate ();

PSTMT.Close ();

should be okay. You can change it according to the situation

转载请注明原文地址:https://www.9cbs.com/read-106046.html

New Post(0)