It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming ASP & ASP.NET Forum

ASP CLOB UPDATE

ASP CLOB UPDATE

Postby mamasagarika on Thu Dec 02, 2004 12:13 pm

Hi
Am trying to update VARVALUE field with more than 4000 Charecters which will be given in the text area of hrcex.html file.It is updating the data wchose length is less than 4000Charecters.Want to update data with more than 4000Charecters my table structure is like this and my code is like below.Pls make the necessary correction and send me at mamasagarika@yahoo.co.uk
Name Null? Type
----------------------------------------- -------- ---------------
SITEID VARCHAR2(20)
SITEDATE DATE
VARNAME VARCHAR2(100)
VARVALUE CLOB

hrcex.html
<html>

<head>
<title>Enter the SQL here</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>

<body>

<form name="thisform" method="post" action="hrcu1.asp">
<div align="center"><center><p><font color="#FF0000"><big><strong>Enter the SQL to execute</strong></big></font></p>
</center></div><p><textarea name="sql" rows="3" cols="80"></textarea></p>
<div align="center"><center><p><input type="submit" name="submit" value="Submit"> <input
type="reset" name="reset" value="Reset"></p>
</center></div>
</form>
</body>
</html>

hrcu1.asp


<%
Dim OraSession
Dim OraDatabase
Dim Ora
Set OraSession = Nothing
Set OraDatabase = Nothing
Set Ora = Nothing

Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set Ora = OraSession.DbOpenDatabase("ORA","LG/LG",cint(0))

VarValue = Replace(Request.Form("sql"),"'","''")

strSql = strSql & "update sitedata set VarValue ="
strSql = strSql & " ' " & VarValue & " ' where siteid='FVS' and VarName='txtLink' "

Response.write( "Going to fire the following SQL<br>" & strSql )

Ora.ExecuteSQL strSql

Response.write( "SQL execute success")



%>
mamasagarika
 
Posts: 2
Joined: Thu Dec 02, 2004 11:43 am

here is the solution

Postby techyashish on Fri Dec 03, 2004 12:00 am

In Access you have to use "memo" as the field type.
In SQL Server use "text".
techyashish
 
Posts: 10
Joined: Wed Oct 06, 2004 6:27 pm
Location: toronto

Postby techyashish on Fri Dec 03, 2004 12:03 am

hi

can u tell me the error if any in oracle, so that i can solve it accordingly


one common error is QW, DB2 v. 7

is there any error occuring
techyashish
 
Posts: 10
Joined: Wed Oct 06, 2004 6:27 pm
Location: toronto

Postby mamasagarika on Sat Dec 04, 2004 5:14 am

Hi
when am entering charecters<4000 then no error when it is exceeding this following error is coming
Error Type:
Oracle Automation (0x800A01B8)
SQL execution error, ORA-01704: string literal too long
/logovending/hrcu1.asp, line 21

Thanks
mamasagarika
 
Posts: 2
Joined: Thu Dec 02, 2004 11:43 am


Who is online

Users browsing this forum: No registered users and 0 guests