You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Feldman, Leonid" <le...@comverse-in.com> on 2000/04/05 19:15:06 UTC

problem wtih update query ( sqlprocessor )

Hi.

I am using Cocoon 1.7.0 + tomcat 3.1b1 + jdk 1.2.2 (sun) on windows NT 4.

I am connecting to the MS SQL 7.0 by using TdsDrivers.

I run into a problem with update query, consider the folowing example

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="changepin.xsl" type="text/xsl"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core"> 
<PAGE> 	

<xsp:logic> 
 // session logic goes here
 // get newpin,oldpin and name           
</xsp:logic> 

<connectiondefs>
	  <connection name="con">
		   <driver>com.inet.tds.TdsDriver</driver>
	
<dburl>jdbc:inetdae:xxx.xxx.xxx.xxx?database=testdb</dburl>
		   <username>sa</username>
		   <password></password>
	  </connection>
</connectiondefs> 

<query connection="con">
		  update subscriber
		  set pin = <xsp:expr>newpin</xsp:expr>
		  where id= <xsp:expr>name</xsp:expr> and
pin=<xsp:expr>oldpin</xsp:expr>
</query>		

		
</PAGE> 
</xsp:page> 		

I get the following result:

	[TDS Driver]No result sets were produced by 
				' update pps_subscriber
				  set pin = yyyyyy
				  where subscriber_id= xxxxx and pin=zzzzz '





The pin value on the server has been changed to yyyyyy.

How can i get sqlprocessor not to expect a result recordset ?

Thanks,
Leonid