vb.net - ORA-01704: string literal too long when updating a record -


Trying to update the Oracle database record and I get this error:
   

ORA-01704: The string is literally too long 5 < / Pre>

I saw that error and I think I have been using Oracle 10G, so I have a limit of 4000 Charter. However, this project is that it is the exact data that I am putting back in that record, that is why I am unsure about the fact that I took it from the error I gave for the same data.

Here is my updated code:

  Dim as myCommand New OracleCommand (try the dim Ra integer as myCommand = New OracleCommand ("Update CSR. CSR_EAI_SOURCE set STATUS_CODE = 'blah', COMPLETE_DATE = '', data = '' & amp; theData & amp; " 'where EID =' 81062144 '", OracleConnection) ra = myCommand.ExecuteNonQuery () OracleConnection.Close () catch MsgBox ("Error" & Err.Description & amp; "" & Amp; Err.Number)   

I'm not trying to believe that if there is a particular object, then you Whether to make a palm update or not.

i like this Remove the claw from:

  OracleClob = dr.GetOracleClob (9) data as a slow blob. String = "" that = blob. Value   

<

P>

Update code

  Slow Oracle Command as new Oracle Command () as the integer as the new Orakl Command my Command dIM () RA Dr. Reed () dim BLOB OracleClob = dr.GetOracleClob (9) dim theData string = " As "theata = blob.Value theData = Change (theData," a ?? | "" ") (Try as dim strSQL string isConnected2 = connectToOracleDB2 in) OracleConnection.Close () if the insert 2 = False Then MsgBox (" ERRORConn: "& amp; error. Descriptions and amp;" "& Amp; Err.Number) otherwise MyCommand.Connection = OracleConnection2 strSQL = "update CSR.CSR_EAI_SOURCE set STATUS_CODE = 'ERROR', COMPLETE_DATE = '', data = 1 where EID = '" & amp; EID & amp; "'" MyCommand .CommandText = strSQL as the ultimate dim OracleParameter = myCommand.Parameters.Add ( "", OracleDbType.Clob) param.Direction = Application ParameterDirection.Input param.Value = theData Application.DoEvents () ra = myCommand.ExecuteNonQuery (). DoEvents () OracleConnection2.Close () Application.DoEvents () end then catching MsgBox ("tr Tip: "& amp; Err.Description & amp;" "& Err.Number) OracleConnection2.Close () end while try ending. Close () OracleConnection.Close ()   

Do not hardcode the value in your SQL query. Instead, wrap it in a parameter like this:

  dim strSQL string as strSQL = "Update CSR.CSR_EAI_SOURCE set STATUS_CODE = 'Blow', COMPLETE_DATE = '', Data =: 1 Where EID = '81, 062,144 ' "myCommand.CommandText = StrSQL   

and then:

  as dim param OracleParameter = myCommand.Parameters.Add (" " , OracleDbType.Clob) param.Direction = Parameter Direction. Input param.Value = blob.Value   

You can of course add all other variables (status codes, complete date, EID) of your query as parameters, rather than them Hard-coding in your SQL

Comments