Re: [Arrowheadasp-users] Hello, I got this ASP Error.
Status: Alpha
Brought to you by:
lazerdye
|
From: Terence H. <laz...@tr...> - 2003-01-30 21:33:29
|
Dear Layland Chui,
I have just released version 0.2.1 of ArrowHead which supports updatable
record sets. Please try this version and let me know if you have any
further problems.
Sincerely,
Terence Haddock
On Fri, 2003-01-03 at 12:29, Leyland Chui wrote:
> Dear All,
>
> On the JAVA's ASP, How can I write data on database using ADODB?
>
> IIS/ASP-DSNLESS (It's working) / ChiliASP-DSNLESS (Not Sure, Should Be Work)
>
> <%
> NewsConStr = "DRIVER={MySQL Driver};SERVER=10.0.0.1;DATABASE=news;UID=news;PWD=news; OPTION=35"
> Set Conn=Server.CreateObject("ADODB.Connection")
> Set rs=Server.CreateObject("ADODB.RecordSet")
> SQL = "SELECT * From webs where id=1"
> Conn.open NewsConStr
> rs.open SQL,conn,2,2 ' <--- set 2,2 enable read/write, it will be set read-only without it. (Tested on IIS)
>
> If rs Is Nothing or rs.EOF Then
> Response.Write "News ID NOT FOUND"
> Response.End
> End If
>
> rs("clicks")=rs("clicks") +1
> rs.update
> rs.close
> conn.close
>
> %>
>
> On The JAVA's ASP, It contains errors.
>
> <%
>
> Server.CreateObject("java:org.gjt.mm.mysql.Driver")
> Set Conn = Server.CreateObject("ADODB.Connection")
> SQL = "SELECT * From webs where id=1"
> Conn.open "jdbc:mysql://10.0.0.1/news?user=news&password=news"
> Set rs = Conn.execute(SQL)
>
> If rs Is Nothing or rs.EOF Then
> Response.Write "News ID NOT FOUND"
> Response.End
> End If
>
> rs("clicks")=rs("clicks") +1
> rs.update
>
> %>
>
> Error Output Is
>
> java.lang.RuntimeException: Setting value of read-only variable
> at com.tripi.asp.ADODB.RecordSet$FieldsMap.put(RecordSet.java:337)
> at com.tripi.asp.ADODB.RecordSet.put(RecordSet.java:302)
> at com.tripi.asp.JavaObjectNode$JavaAccessorNode.setValue(JavaObjectNode.java:284)
> at com.tripi.asp.SetValueNode.execute(SetValueNode.java:132)
> at com.tripi.asp.BlockNode.execute(BlockNode.java:131)
> at com.tripi.asp.AspThread.run(AspThread.java:74)
> at java.lang.Thread.run(Thread.java:536)
> File /var/tomcat4/webapps/aspfiles/news.asp line 14: java.lang.RuntimeException: Setting value of read-only variable
>
> Best Regards,
> Leyland Chui
>
>
>
>
--
Terence Haddock <laz...@tr...>
|