Re: [xwiki-users] Query external MSSQL DB in a wiki page

2014-12-19 Thread vinc...@massol.net
Hi Bryn,


On 17 Dec 2014 at 22:49:26, Bryn Jeffries 
(bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote:

 I wrote:
  I have managed the following with an external PostgreSQL server:
  Retrieve and display queried data in a page with Groovy; Write a Java
  component to perform query, call and display with Groovy or Velocity;
  Generate JSON data of query results with Groovy, call and display from
  LiveTable.
 
  Happy to share but not near my computer till later today, so let me know
  which of the above is closest to what you want to do and I'll post something
  when I can.
  
 I've put some examples into the following wiki page:
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/ExternalDBAccess
  
 I hope that's the correct approach to sharing this kind of stuff - please 
 advise if not.

Thanks for this! :) It’s great to see participation in the wiki.

Now, I’ve done some gardening and since we already have a page about executing 
SQL (http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL), I have 
merged your tutorial on this page.

Hope it’s fine with you!

Also note that you should use a connection pool and use a data source instead 
of defining the user/password/url directly.

Thanks!
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Query external MSSQL DB in a wiki page

2014-12-17 Thread Bryn Jeffries
I wrote:
 I have managed the following with an external PostgreSQL server:
 Retrieve and display queried data in a page with Groovy; Write a Java
 component to perform query, call and display with Groovy or Velocity;
 Generate JSON data of query results with Groovy, call and display from
 LiveTable.
 
 Happy to share but not near my computer till later today, so let me know
 which of the above is closest to what you want to do and I'll post something
 when I can.

I've put some examples into the following wiki page:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/ExternalDBAccess

I hope that's the correct approach to sharing this kind of stuff - please 
advise if not. 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Query external MSSQL DB in a wiki page

2014-12-12 Thread Hamster
I would also love to see an example!



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Query-external-MSSQL-DB-in-a-wiki-page-tp7593386p7593472.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Query external MSSQL DB in a wiki page

2014-12-09 Thread Bryn Jeffries
I have managed the following with an external PostgreSQL server:
Retrieve and display queried data in a page with Groovy;
Write a Java component to perform query, call and display with Groovy or 
Velocity;
Generate JSON data of query results with Groovy, call and display from 
LiveTable.

Happy to share but not near my computer till later today, so let me know which 
of the above is closest to what you want to do and I'll post something when I 
can.

- Reply message -
From: Jason Clemons jason.clem...@live.com
To: Xwiki Users users@xwiki.org
Cc: Clemons Jason jason.m.clem...@aexp.com
Subject: [xwiki-users] Query external MSSQL DB in a wiki page
Date: Tue, Dec 9, 2014 08:26


Hello,

Can anyone point me in the right direction?  I'm trying to query and external 
Microsoft SQL database from a wiki page.  My current wiki runs on MSSQL just 
fine using sqljdbc4.jar configured with hibernate.  The DB I want to query is 
actually on the same server, I can actually make it appear in the same DB if 
that makes things easier.

I've looked at SQL Tools extension -- 
http://extensions.xwiki.org/xwiki/bin/view/Extension/SQL+Tools  and I can get 
that to work just fine even querying the other database, but I don't know how 
to make the results of a query from that tool appear in a separate page I've 
created for use in Velocity for example.

I've tried to get the example on the Execute SQL page here -- 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL to work but I 
get a Groovy error on the second snippet and nothing at all appears on the page 
using the first snippet (but no error).

I've also looked at this plugin -- 
http://xwikisql.gradsoft.ua/docs/XWikiSqlPluginGuide.html  but it hasn't been 
updated since 2008, so I'm not really sure that's a good idea from a 
sustainability perspective in a production environment.

Ultimately, I will have a flat table in some database, really any database 
(e.g..it can be the XWIKI DB)..and I need to be able to get the rows and 
columns from the table and expose them as an HTML table in my wiki page.  Once 
I figure out how to get the data making it into a table is easy enough, but I 
can't even figure out how to get an object or array with the data in it to 
iterate.

All help is greatly appreciated.

Thanks in advance,

Jason

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users