Re: Microsoft SQLserver with cocoon

2002-12-03 Thread Gabriele Domenichini
Thanks all,
Please please contribute to the page on specific database 
connections on wiki.
It's pretty simple:
1. go to 
http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
2. see what others like you have done. Copy one of them in a new page 
you create
3. Adapt it to the specifity of Ms SQL connection and add tips that you 
have learned

If someone had done it before, Maxime wouldn't have needed to ask for 
the solution to the group.


Christopher Watson wrote:

Maxime


1)

When I last got the drivers there were 3 jars, namely
msbase.jar
mssqlserver.jar
msutil.jar

Try putting all 3 jars into cocoon's WEB-INF/lib

2)

For mssql add following lines (between ... ...) to in WEB-INF/web.xml
within
   init-param
 param-nameload-class/param-name
 param-value

...
   !-- For mssql2000 Driver: --
   com.microsoft.jdbc.sqlserver.SQLServerDriver
...

3)

Add following jdbc element within datasources/ in cocoon.xconf

   jdbc name=my_sql2000_cocoon_datasource
 pool-controller min=5 max=10/

dburljdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydatabase
/dburl
 usersa/user
 passwordmypassword/password
   /jdbc

assuming database on 
Server:	localhost
Port:		1433
Database:	mydatabase
and user and password as specified
please edit as necessary

4)

You can now (after restarting servlet engine) do something like 

?xml version=1.0?
xsp:page language=java
 xmlns:xsp=http://apache.org/xsp;
	  xmlns:esql=http://apache.org/cocoon/SQL/v2;
 

page
  esql:connection
esql:poolmy_sql2000_cocoon_datasource/esql:pool
  my_table_element
esql:execute-query
  esql:query
select fld1 as myfield1, fld1 as myfield2 from mytable
/esql:query
esql:results
  esql:row-results
my_row_element
 	   my_column_one_elementesql:get-string
column=myfield1//my_column_one_element
 	   my_column_two_elementesql:get-string
column=myfield2//my_column_two_element
/my_row_element
  /esql:row-results
/esql:results
esql:no-results
  no-resultsno-results/no-results
/esql:no-results
  /esql:execute-query
  /my_table_element
/esql:connection
/page
/xsp:page

Where 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 02 December 2002 10:10
To: [EMAIL PROTECTED]
Subject: Microsoft SQLserver with cocoon


Hi
I want to use a microsoft sql server with cocoon, so I downloaded
Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
cocoon's library dir, restarted cocoon. 
Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
to make a connection and get data?

Thanks

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html

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




RE: Microsoft SQLserver with cocoon

2002-12-02 Thread Christopher Watson
Maxime


1)

When I last got the drivers there were 3 jars, namely
msbase.jar
mssqlserver.jar
msutil.jar

Try putting all 3 jars into cocoon's WEB-INF/lib

2)

For mssql add following lines (between ... ...) to in WEB-INF/web.xml
within
init-param
  param-nameload-class/param-name
  param-value

...
!-- For mssql2000 Driver: --
com.microsoft.jdbc.sqlserver.SQLServerDriver
...

3)

Add following jdbc element within datasources/ in cocoon.xconf

jdbc name=my_sql2000_cocoon_datasource
  pool-controller min=5 max=10/
 
dburljdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydatabase
/dburl
  usersa/user
  passwordmypassword/password
/jdbc

assuming database on 
Server: localhost
Port:   1433
Database:   mydatabase
and user and password as specified
please edit as necessary

4)

You can now (after restarting servlet engine) do something like 

?xml version=1.0?
xsp:page language=java
  xmlns:xsp=http://apache.org/xsp;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;

page
   esql:connection
 esql:poolmy_sql2000_cocoon_datasource/esql:pool
   my_table_element
 esql:execute-query
   esql:query
 select fld1 as myfield1, fld1 as myfield2 from mytable
 /esql:query
 esql:results
   esql:row-results
 my_row_element
   my_column_one_elementesql:get-string
column=myfield1//my_column_one_element
   my_column_two_elementesql:get-string
column=myfield2//my_column_two_element
 /my_row_element
   /esql:row-results
 /esql:results
 esql:no-results
   no-resultsno-results/no-results
 /esql:no-results
   /esql:execute-query
   /my_table_element
 /esql:connection
/page
/xsp:page

Where 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 02 December 2002 10:10
To: [EMAIL PROTECTED]
Subject: Microsoft SQLserver with cocoon


Hi
I want to use a microsoft sql server with cocoon, so I downloaded
Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
cocoon's library dir, restarted cocoon. 
Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
to make a connection and get data?

Thanks

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: Microsoft SQLserver with cocoon

2002-12-02 Thread Morrison, John
Christopher,

Would you consider putting this information into some form
of documentation we could include with the code?

Thanks,

J.

 -Original Message-
 From: Christopher Watson [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 2 December 2002 11:37 am
 To: [EMAIL PROTECTED]
 Subject: RE: Microsoft SQLserver with cocoon
 
 
 Maxime
 
 
 1)
 
 When I last got the drivers there were 3 jars, namely
 msbase.jar
 mssqlserver.jar
 msutil.jar
 
 Try putting all 3 jars into cocoon's WEB-INF/lib
 
 2)
 
 For mssql add following lines (between ... ...) to in WEB-INF/web.xml
 within
 init-param
   param-nameload-class/param-name
   param-value
 
 ...
 !-- For mssql2000 Driver: --
 com.microsoft.jdbc.sqlserver.SQLServerDriver
 ...
 
 3)
 
 Add following jdbc element within datasources/ in cocoon.xconf
 
 jdbc name=my_sql2000_cocoon_datasource
   pool-controller min=5 max=10/
  
 dburljdbc:microsoft:sqlserver://localhost:1433;DatabaseName=
 mydatabase
 /dburl
   usersa/user
   passwordmypassword/password
 /jdbc
 
 assuming database on 
 Server:   localhost
 Port: 1433
 Database: mydatabase
 and user and password as specified
 please edit as necessary
 
 4)
 
 You can now (after restarting servlet engine) do something like 
 
 ?xml version=1.0?
 xsp:page language=java
   xmlns:xsp=http://apache.org/xsp;
 xmlns:esql=http://apache.org/cocoon/SQL/v2;
 
 page
esql:connection
  esql:poolmy_sql2000_cocoon_datasource/esql:pool
my_table_element
  esql:execute-query
esql:query
  select fld1 as myfield1, fld1 as myfield2 from mytable
  /esql:query
  esql:results
esql:row-results
  my_row_element
  my_column_one_elementesql:get-string
 column=myfield1//my_column_one_element
  my_column_two_elementesql:get-string
 column=myfield2//my_column_two_element
  /my_row_element
/esql:row-results
  /esql:results
  esql:no-results
no-resultsno-results/no-results
  /esql:no-results
/esql:execute-query
/my_table_element
  /esql:connection
 /page
 /xsp:page
 
 Where 
 
 
 -Original Message-
 From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]] 
Sent: 02 December 2002 10:10
To: [EMAIL PROTECTED]
Subject: Microsoft SQLserver with cocoon


Hi
I want to use a microsoft sql server with cocoon, so I downloaded
Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
cocoon's library dir, restarted cocoon. 
Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
to make a connection and get data?

Thanks

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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


===
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

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

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




RE: Microsoft SQLserver with cocoon

2002-12-02 Thread Christopher Watson
John, I'd be delighted,
Please tell me more, e.g. what form it should take, what it should
include, etc

Contact me off-list if you wish,

Christopher

-Original Message-
From: Morrison, John [mailto:[EMAIL PROTECTED]] 
Sent: 02 December 2002 11:42
To: '[EMAIL PROTECTED]'
Subject: RE: Microsoft SQLserver with cocoon


Christopher,

Would you consider putting this information into some form
of documentation we could include with the code?

Thanks,

J.



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

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




Re: Microsoft SQLserver with cocoon

2002-12-02 Thread Bertrand Delacretaz
On Monday 02 December 2002 13:07, Christopher Watson wrote:
 Please tell me more, e.g. what form it should take, what it should
 include, etc

A good place to put database-specific connection information is at the 
Cocooon DocoWiki:

From this page
http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
create a new page similar to the existing examples.

See the main Wiki page at
http://outerthought.net/wiki/Wiki.jsp?page=Main
If you're unsure about how to do this (but it is really easy).

-Bertrand

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

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