RE: Calling MS SQL stored procedure

2002-02-22 Thread Miller, Grant

Thanks. Actually we've got it to work now, all it was was that the
in-parameter tag needed the sql namespace!

-Original Message-
From: neil [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 10:30 PM
To: [EMAIL PROTECTED]
Subject: RE: Calling MS SQL stored procedure


I'm using  instead of IN parameters:
{ ? = call sp(
'',

) }

The MS JDBC driver had trouble parsing a query with new lines in it,
but at least it gets by with one long line.

In reply to:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101429060624988&w=2


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Calling MS SQL stored procedure

2002-02-21 Thread neil

I'm using  instead of IN parameters:
{ ? = call sp(
'',

) }

The MS JDBC driver had trouble parsing a query with new lines in it,
but at least it gets by with one long line.

In reply to:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101429060624988&w=2


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Calling MS SQL stored procedure

2002-02-21 Thread Miller, Grant

Hi,
I'm calling a procedure with no return parameters so hopefully there are no
problems there.
However, I cannot work out how to pass in the in parameters. If I try:

{call
testformike['test']}

or

{call
testformike[?]}
 

I get the error:

Could not find stored procedure ''. 

But it does work with no parameters.
Any ideas?

Cheers

Grant

-Original Message-
From: neil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 10:29 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Calling MS SQL stored procedure


Sorry I can't reply to the same thread. I rely on the archives as the
traffic is too high for me to stay subscribed. This is in reply to:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101423330019994&w=2

I use the JDBC escape syntax as Christian Haul suggested in his reply, but I
also had to
modify SQLTransformer.java to handle the ResultSets returned by SQL Server
stored procedures.
I've tried to make it handle multiple returned ResultSets, but can't test
with more than one
because my MS JDBC driver only handles the first one then says there are no
more.

SQLTransformer.java only handled ResultSets as OUT parameters (as used by
Oracle, Postgres etc.) not those returned implicitly as by SQL Server.

I posted the patch to cocoon-users on 2002-02-08
This might take you there:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101316887401395&w=2

Please share any improvements you may have.
Cheers,
Neil.


Subject:  Calling MS SQL stored procedure
From: "Miller, Grant" <[EMAIL PROTECTED]>
Date: 2002-02-20 15:45:47
Hi,
I'm having a problem calling an ms sql server stored procedure with the sql
transformer (using cocoon 2.0.1 and tomcat 4).
The code is:


   
  begin dbo.testformike('hi');
  end;
   


The error message is:

Invalid call syntax: begin dbo.testformike('hi'); end;

I always get this with isstoredprocedure="true".
Also, I'm not sure what the qualifier before the function name should be
(dbo is the owner in this example).
Another thing we have tried is:

This query:


  exec DBO.TESTFORMIKE 'hi'



but this gives:

A server cursor is not allowed on a remote stored procedure or stored
procedure with more than one SELECT statement. Use a default result set or
client cursor

We are completely stuck and do not want to use esql.
Thanks for any help,

Grant Miller



-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Calling MS SQL stored procedure

2002-02-20 Thread neil

Sorry I can't reply to the same thread. I rely on the archives as the
traffic is too high for me to stay subscribed. This is in reply to:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101423330019994&w=2

I use the JDBC escape syntax as Christian Haul suggested in his reply, but I
also had to
modify SQLTransformer.java to handle the ResultSets returned by SQL Server
stored procedures.
I've tried to make it handle multiple returned ResultSets, but can't test
with more than one
because my MS JDBC driver only handles the first one then says there are no
more.

SQLTransformer.java only handled ResultSets as OUT parameters (as used by
Oracle, Postgres etc.) not those returned implicitly as by SQL Server.

I posted the patch to cocoon-users on 2002-02-08
This might take you there:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101316887401395&w=2

Please share any improvements you may have.
Cheers,
Neil.


Subject:  Calling MS SQL stored procedure
From: "Miller, Grant" <[EMAIL PROTECTED]>
Date: 2002-02-20 15:45:47
Hi,
I'm having a problem calling an ms sql server stored procedure with the sql
transformer (using cocoon 2.0.1 and tomcat 4).
The code is:


   
  begin dbo.testformike('hi');
  end;
   


The error message is:

Invalid call syntax: begin dbo.testformike('hi'); end;

I always get this with isstoredprocedure="true".
Also, I'm not sure what the qualifier before the function name should be
(dbo is the owner in this example).
Another thing we have tried is:

This query:


  exec DBO.TESTFORMIKE 'hi'



but this gives:

A server cursor is not allowed on a remote stored procedure or stored
procedure with more than one SELECT statement. Use a default result set or
client cursor

We are completely stuck and do not want to use esql.
Thanks for any help,

Grant Miller



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Calling MS SQL stored procedure

2002-02-20 Thread Christian Haul

On 20.Feb.2002 -- 10:45 AM, Miller, Grant wrote:
> Hi,
> I'm having a problem calling an ms sql server stored procedure with the sql
> transformer (using cocoon 2.0.1 and tomcat 4).
> The code is:
> 
> 
>
>   begin dbo.testformike('hi');
>   end;
>
> 
> 
> The error message is:
> 
> Invalid call syntax: begin dbo.testformike('hi'); end;

Never used any of the above, but you might want to consider the JDBC
escape syntax

   {?= call [,, ...]}
   {call [,, ...]}

Maybe that'll make your driver happier

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>