Re: Problem with my query

2001-06-16 Thread Sergio Carvalho

On Wed, 13 Jun 2001 10:07:07 -0500
Gustavo Mejia <[EMAIL PROTECTED]> wrote:

 
> And now It works, but now what I wanto to do i to make variable the criteria of
> my query, yes, something like
> 
> select * from employee where empno=MY_VARIABLE
> 
> Do you know how can I do that ?

See my post on the thread with subject "How to pass sitemap parameters to XSP". It 
should place you on the right track.


-
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: Problem with my query

2001-06-13 Thread Janesh Vasudeva

Hi

Actually i want to know the exact property specified in cocoon.properties,
to find the java code as u have said we can see java code generated by xsp
processor

Thanks
Janesh

- Original Message -
From: Christopher Painter-Wakefield <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 3:52 AM
Subject: Re: Problem with my query


>
> Gustavo,
>
> if you want to send me your code (you can send it directly to me) I'll be
> glad to take a look.  At a guess, though, I would think that your query
> just isn't returning any data.  I assume you are passing in a valid
> paremeter in your request string.  Perhaps your database is expecting an
> integer and you are giving it a string, or vice-versa.
>
> You should probably spend some time looking at what you are getting from
> your request parameters to help you get familiar with what is happening.
> Just write a simple XSP page something like:
> ...
>xmlns:xsp="http://www.apache.org/1999/XSP/Core";
>   xmlns:request="http://www.apache.org/1999/XSP/Request";
> >
> 
>   VAR =   
> 
> 
>
> You should also take a look at the generated Java code to see if that
sheds
> any light.  The Java code will be in your repository.  The location of the
> repository is defined in your cocoon.properties.  Looking at the code is a
> good way to begin to understand what is really going on when you write
XSP,
> and will help you make better guesses as to the proper syntax to use.
>
> Good luck.
>
> -Christopher
>
>
>
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  Re: Problem with my query
>
>
> Christopher sorry for all the troubles,
>
> But, I didn't get it, I tried it, there is not any error message, but
there
> is not any result.
>
> any other idea ??
>
>
> Thanks so much !
>
> Gustavo
>
> Christopher Painter-Wakefield wrote: Gustavo,
>
> you want to use the request taglib, for which there isn't any
documentation
> (hopefully soon there will be). Anyway, try this:
> 
> select * from employee where empno=
> 
> 
> 
> 
>
> You'll need to add a declaration for the request namespace in your
xsp:page
> element, like this:
> xmlns:request="http://www.apache.org/1999/XSP/Request";
>
> I think you will need to take out the quotes on your query string, like
> this:
> http://localhost/cocoon/servlet/sql/esql.xml?VAR=01
>
> -Christopher
>
>
>
>
>
>
> -
> 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]>
>


-
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: Problem with my query

2001-06-13 Thread Christopher Painter-Wakefield


Gustavo,

if you want to send me your code (you can send it directly to me) I'll be
glad to take a look.  At a guess, though, I would think that your query
just isn't returning any data.  I assume you are passing in a valid
paremeter in your request string.  Perhaps your database is expecting an
integer and you are giving it a string, or vice-versa.

You should probably spend some time looking at what you are getting from
your request parameters to help you get familiar with what is happening.
Just write a simple XSP page something like:
...
http://www.apache.org/1999/XSP/Core";
  xmlns:request="http://www.apache.org/1999/XSP/Request";
>

  VAR =   



You should also take a look at the generated Java code to see if that sheds
any light.  The Java code will be in your repository.  The location of the
repository is defined in your cocoon.properties.  Looking at the code is a
good way to begin to understand what is really going on when you write XSP,
and will help you make better guesses as to the proper syntax to use.

Good luck.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Re: Problem with my query


Christopher sorry for all the troubles,

But, I didn't get it, I tried it, there is not any error message, but there
is not any result.

any other idea ??


Thanks so much !

Gustavo

Christopher Painter-Wakefield wrote: Gustavo,

you want to use the request taglib, for which there isn't any documentation
(hopefully soon there will be).  Anyway, try this:

  select * from employee where empno=
  
    
  


You'll need to add a declaration for the request namespace in your xsp:page
element, like this:
  xmlns:request="http://www.apache.org/1999/XSP/Request";

I think you will need to take out the quotes on your query string, like
this:
http://localhost/cocoon/servlet/sql/esql.xml?VAR=01

-Christopher






-
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: Problem with my query

2001-06-13 Thread Gustavo Mejia


Christopher sorry for all the troubles,
But, I didn't get it, I tried it, there is not any error message, but
there is not any result.
any other idea ??
 
Thanks so much !
Gustavo
Christopher Painter-Wakefield wrote:
Gustavo,
you want to use the request taglib, for which there isn't any documentation
(hopefully soon there will be).  Anyway, try this:

  select * from employee where empno=
  
    
  

You'll need to add a declaration for the request namespace in your xsp:page
element, like this:
  xmlns:request="http://www.apache.org/1999/XSP/Request"
I think you will need to take out the quotes on your query string, like
this:
http://localhost/cocoon/servlet/sql/esql.xml?VAR=01
-Christopher
Thanks again,
Right, I need to do the first thing that you told me, I tried but with
no
results, I have something like this:
select * from employee
   
where empno=VAR

and in my browser the url is:
http://localhost/cocoon/servlet/sql/esql.xml?VAR="01"
but, doesn't show information.
Maybe it is not very difficult, but I really starting with this things.
Thanks
Gustavo
-
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: Problem with my query

2001-06-13 Thread Christopher Painter-Wakefield


Gustavo,

you want to use the request taglib, for which there isn't any documentation
(hopefully soon there will be).  Anyway, try this:

  select * from employee where empno=
  

  


You'll need to add a declaration for the request namespace in your xsp:page
element, like this:
  xmlns:request="http://www.apache.org/1999/XSP/Request";

I think you will need to take out the quotes on your query string, like this:
http://localhost/cocoon/servlet/sql/esql.xml?VAR=01

-Christopher




Thanks again,

Right, I need to do the first thing that you told me, I tried but with no
results, I have something like this:

select * from employee
where empno=VAR


and in my browser the url is:

http://localhost/cocoon/servlet/sql/esql.xml?VAR="01";

but, doesn't show information.

Maybe it is not very difficult, but I really starting with this things.

Thanks

Gustavo





-
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: Problem with my query

2001-06-13 Thread Gustavo Mejia

Thanks again,

Right, I need to do the first thing that you told me, I tried but with no
results, I have something like this:

select * from employee
where empno=VAR


and in my browser the url is:

http://localhost/cocoon/servlet/sql/esql.xml?VAR="01";

but, doesn't show information.

Maybe it is not very difficult, but I really starting with this things.

Thanks

Gustavo


Christopher Painter-Wakefield wrote:

> Gustavo,
>
> you're welcome.  There are probably many ways to do what you are asking;
> you should probably get a book on servlet programming or web application
> development.  Anything that you can do with CGI or servlets you can do (I
> believe) with XSP and Cocoon.  So, for instance, you can pass parameters in
> the query string (http://myserver.org/cocoon/myquery.xml?empno=1234), or
> you can store stuff in the session, or you can store stuff in a database,
> etc.  Is there a specific approach you wanted to ask about?
>
> -Christopher
>
> Thanks Christopher,
>
> But now, how can I assign the variable from other XML, how can I pass to
> the XML with my query ?
>
> I really apreciate your hellp !
>
> Gustavo
>
> -
> 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]>


-
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: Problem with my query

2001-06-13 Thread Christopher Painter-Wakefield


Gustavo,

you're welcome.  There are probably many ways to do what you are asking;
you should probably get a book on servlet programming or web application
development.  Anything that you can do with CGI or servlets you can do (I
believe) with XSP and Cocoon.  So, for instance, you can pass parameters in
the query string (http://myserver.org/cocoon/myquery.xml?empno=1234), or
you can store stuff in the session, or you can store stuff in a database,
etc.  Is there a specific approach you wanted to ask about?

-Christopher




Thanks Christopher,

But now, how can I assign the variable from other XML, how can I pass to
the XML with my query ?

I really apreciate your hellp !

Gustavo





-
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: Problem with my query

2001-06-13 Thread Gustavo Mejia

Thanks Christopher,

But now, how can I assign the variable from other XML, how can I pass to
the XML with my query ?

I really apreciate your hellp !

Gustavo


Christopher Painter-Wakefield wrote:

> Gustavo,
>
> try this:
>
> select * from employee where empno=
>   MY_VARIABLE
> 
>
> You may need to specify a type, such as ,
> otherwise it will assume a String.
>
> -Christopher
>
> Thanks,
>
> I chanche my code to:
> 
>
> 
>xmlns:xsp="http://www.apache.org/1999/XSP/Core";
>   xmlns:esql="http://apache.org/cocoon/SQL/v2";
> >
>
> 
> 
>   oracle.jdbc.driver.OracleDriver
>   jdbc:oracle:thin:@MyIP:MyPort:cta
>   UserID
>   Password
>   
> select * from employee
> 
>   header info
>   
> 
>   
>   
>  
>   
>   footer info
> 
>   
> 
> 
> 
>
> And now It works, but now what I wanto to do i to make variable the
> criteria of
> my query, yes, something like
>
> select * from employee where empno=MY_VARIABLE
>
> Do you know how can I do that ?
>
> Thanks a lot !!
>
> Gustavo
>
> -
> 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]>


-
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: Problem with my query

2001-06-13 Thread Christopher Painter-Wakefield


Gustavo,

try this:

select * from employee where empno=
  MY_VARIABLE


You may need to specify a type, such as ,
otherwise it will assume a String.

-Christopher



Thanks,

I chanche my code to:



http://www.apache.org/1999/XSP/Core";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
>



  oracle.jdbc.driver.OracleDriver
  jdbc:oracle:thin:@MyIP:MyPort:cta
  UserID
  Password
  
select * from employee

  header info
  

  
  
 
  
  footer info

  




And now It works, but now what I wanto to do i to make variable the
criteria of
my query, yes, something like

select * from employee where empno=MY_VARIABLE

Do you know how can I do that ?

Thanks a lot !!

Gustavo







-
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: Problem with my query

2001-06-13 Thread Gustavo Mejia

Thanks,

I chanche my code to:



http://www.apache.org/1999/XSP/Core";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
>



  oracle.jdbc.driver.OracleDriver
  jdbc:oracle:thin:@MyIP:MyPort:cta
  UserID
  Password
  
select * from employee

  header info
  

  
  
 
  
  footer info

  




And now It works, but now what I wanto to do i to make variable the criteria of
my query, yes, something like

select * from employee where empno=MY_VARIABLE

Do you know how can I do that ?

Thanks a lot !!

Gustavo


Luca Morandini wrote:

> Gustavo,
>
> have you already added something like this in cocoon.xconf (under the
> datasources tag) ?
>
> 
> 
> jdbc:oracle:thin:@localhost:1521:ORA81
> login
> password
> 
>
> Remember to re-start Tomcat afterwards any change to cocoon.xconf !
>
> Best regards,
>
> -
>Luca Morandini
>GIS Consultant
> [EMAIL PROTECTED]
>   +39 (0)744  59 85  1 Office
>   +39 0335 681 02 12 Mobile
> http://utenti.tripod.it/lmorandini/index.html
> -
>
> > -Original Message-
> > From: Gustavo Mejia [mailto:[EMAIL PROTECTED]]
> > Sent: mercoledì 13 giugno 2001 16.16
> > To: [EMAIL PROTECTED]
> > Subject: Problem with my query
> > Importance: High
> >
> >
> > Hi,
> >
> >
> > I am using Cocoon 1.8.2, and I am trying to run this query, but I don't
> > see any result
> >
> > My code here :
> >
> > 
> > 
> >
> >  >   language="java"
> >   xmlns:esql="http://www.apache.org/1999/SQL/v2";
> >   xmlns:xsp="http://www.apache.org/1999/XSP/Core";
> >   xmlns:request="http://www.apache.org/1999/XSP/Request";
> > >
> >   
> >   
> >   oracle.jdbc.driver.OracleDriver
> >   jdbc:oracle:thin:@MyIP:MyPort:cta
> >   userID
> >   Password
> >
> >   empleados
> >   registro
> >
> >   select * from employee
> >  
> >  
> >   
> > 
> >
> > What I got is:
> >
> > oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@MyIP:MyPort:cta userID
> > Password empleados registro select * from employee
> >
> > Could you help me ??
> >
> > Thanks
> >
> > Gustavo
> >
> >
> > -
> > 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]>
> >
>
> -
> 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]>


-
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: Problem with my query

2001-06-13 Thread Luca Morandini

Gustavo,

have you already added something like this in cocoon.xconf (under the
datasources tag) ?



jdbc:oracle:thin:@localhost:1521:ORA81
login
password


Remember to re-start Tomcat afterwards any change to cocoon.xconf !

Best regards,
 
-
   Luca Morandini
   GIS Consultant
    [EMAIL PROTECTED]
  +39 (0)744  59 85  1 Office
  +39 0335 681 02 12 Mobile
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Gustavo Mejia [mailto:[EMAIL PROTECTED]]
> Sent: mercoledì 13 giugno 2001 16.16
> To: [EMAIL PROTECTED]
> Subject: Problem with my query
> Importance: High
>
>
> Hi,
>
>
> I am using Cocoon 1.8.2, and I am trying to run this query, but I don't
> see any result
>
> My code here :
>
> 
> 
>
>language="java"
>   xmlns:esql="http://www.apache.org/1999/SQL/v2";
>   xmlns:xsp="http://www.apache.org/1999/XSP/Core";
>   xmlns:request="http://www.apache.org/1999/XSP/Request";
> >
>   
>   
>   oracle.jdbc.driver.OracleDriver
>   jdbc:oracle:thin:@MyIP:MyPort:cta
>   userID
>   Password
>
>   empleados
>   registro
>
>   select * from employee
>  
>  
>   
> 
>
> What I got is:
>
> oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@MyIP:MyPort:cta userID
> Password empleados registro select * from employee
>
> Could you help me ??
>
> Thanks
>
> Gustavo
>
>
> -
> 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]>
>


-
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: Problem with my query

2001-06-13 Thread Christopher Painter-Wakefield


Your esql syntax doesn't look right.  Look at the esql.xml sample in the
samples/sql directory.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Problem with my query


Hi,


I am using Cocoon 1.8.2, and I am trying to run this query, but I don't
see any result

My code here :




http://www.apache.org/1999/SQL/v2";
  xmlns:xsp="http://www.apache.org/1999/XSP/Core";
  xmlns:request="http://www.apache.org/1999/XSP/Request";
>
  
  
  oracle.jdbc.driver.OracleDriver
  jdbc:oracle:thin:@MyIP:MyPort:cta
  userID
  Password

  empleados
  registro

  select * from employee
 
 
  


What I got is:

oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@MyIP:MyPort:cta userID
Password empleados registro select * from employee

Could you help me ??

Thanks

Gustavo





-
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]>




Problem with my query

2001-06-13 Thread Gustavo Mejia

Hi,


I am using Cocoon 1.8.2, and I am trying to run this query, but I don't
see any result

My code here :




http://www.apache.org/1999/SQL/v2";
  xmlns:xsp="http://www.apache.org/1999/XSP/Core";
  xmlns:request="http://www.apache.org/1999/XSP/Request";
>
  
  
  oracle.jdbc.driver.OracleDriver
  jdbc:oracle:thin:@MyIP:MyPort:cta
  userID
  Password

  empleados
  registro

  select * from employee
 
 
  


What I got is:

oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@MyIP:MyPort:cta userID
Password empleados registro select * from employee

Could you help me ??

Thanks

Gustavo


-
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]>