Hmm the list server messes up formatting :(
Added a bunch of lines to see if that's better
<%
import groovy.sql.Sql;
def sendSQL = Sql.newInstance("jdbc:mysql://localhost/myotherdatabase",
"username-can-be-root",
"password-goes-here", "com.mysql.jdbc.Driver")
sendSQL.eachRow("select * from mytable") {row ->
println "${row.sessions_guid}"
}
%>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Esbach, Brandon
Sent: 31 October 2007 12:33
To: XWiki Users
Subject: Re: [xwiki-users] Adding a document in XWiki.org
I took a quick look at "access another database from xwiki in groovy"; this
quick snippet -seems- to work (this uses mysql) <%
import groovy.sql.Sql;
def sendSQL = Sql.newInstance("jdbc:mysql://localhost/myotherdatabase",
"username-can-be-root",
"password-goes-here", "com.mysql.jdbc.Driver") sendSQL.eachRow("select * from
mytable") {row ->
println "${row.sessions_guid}"
}
%>
(you will need a database called "myotherdatabase" and table called "mytable"
for this to work). GORM (groovy's ORM model for hibernate) would be a ton
faster to do extended querying, but I'm not sure if it's usable from Xwiki's
groovy interface.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Your XEN ICT
Team - Ricardo Rodriguez
Sent: 31 October 2007 11:36
To: XWiki Users
Subject: Re: [xwiki-users] Adding a document in XWiki.org
V. Harikrishnan Nair wrote:
Hi, Harikrishnan,
Perhaps the Three Wise Men could be a better target for our messages :-) (I do
hope this Christian metaphor is known enough!)
I think we are messing up things here and this won't be useful for anybody.
Don't you thing it would be better to split this message into three brand new
entries sent to the list? Let's propose...
> Gosh ! I didn't realise that I could create such an uproar ! :-))
>
> To answer Q1. -> I wanted to make XWiki a platform for integrating
> some tools like XPlanner with a Project Mangement template which
> carries copious amounts of data in its database and also as an area
> where employees can interact with each other and share/edit data (making use
> of versioning).
> This is on an experimental basis.
>
> All I wanted to do is -
>
> 1. Insert/read data from the company's database (I'm just doing what I
> am told to do, okay ?).
>
>
Accessing RDBMS other than XWiki own database from XWiki.
> 2. Allow employees to access their domains in the mail server/Bugzilla etc.
> without the need to type in username & password repeatedly - just
> login to XWiki and go to their spaces using links. Something like MS
> Outlook allows you to access your all your mail accounts.
>
>
Something like single sing on, but I don't get the exact point here. Sorry.
> 3. Enter documents under discussion which can be edited by multiple
> persons (along with histories and RSS)
>
Well, this seems to refer any wiki basis: anybody (or any registered user, or
user belonging to a given group, or... depending on your security
configuration) will be able to edit a document. What is the doubt here?
> I hope this is clear enough... :-) Xwiki is serving its purpose but I
> guess just wanted to bend it a bit too much !
>
>
> Harikrishnan
As far as I've understood you are ready to contribute with a document that will
help to solve question number 1 (I'm following that from the "Sample Groovy
Code" thread). Am I right? Vicent has asked about this issue in a previous
message.
Please, Harikrishnan, have you succeeded while retrieving data from a
relational database other than XWiki own database by using Groovy code and you
are ready to enter a document about how to do that intended to help to the
whole community?
Cheers,
Ricardo
--
Ricardo RodrÃguez
Your XEN ICT Team
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users