Hi Peter,

On Oct 8, 2012, at 1:27 PM, Peter Waver <[email protected]> wrote:

> Hello
> 
> I’m very new to xwiki – found it yesterday ;) cause I’m search for a tool to
> display the content of our stock databases. 
> This means - i only need a (read-only) front end to some databases here.
> 
> I found the possibility, to add a custom app in xwiki. But  - so far i see -
> the structure is added to the xwiki default DB.
> 
> Now here is my question. Is it possible to use xwiki as a front-end or set
> up different data sources to connect to different databases? 
> And how can i put values from the DB into a xwiki form? 

See http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL for 
examples of how to run SQL code.

Now, if what you want is to load XObject (XWiki Objects) data an external data 
source then this is not built in. Basically you'll need to provide some script 
to query your DB with SQL (for ex) and then create/populate the XObjects with 
the loaded data.

The alternative is to create some loader that will get the data from an 
external source and put it in the XWiki database. You'll then need to call this 
loader regularly to perform the sync. It really depends if you need a 
bidirectional sync or not. If so then the first solution is the best.

What would be great in the future would be the ability to declare somehow that 
such object is loaded in a custom way and allowing providing some scripts to 
load it as it's done for the Database List property type.

Thanks
-Vincent

> The devel Docs on the wiki side seams to covers an older xwiki version.
> I'm appreciated for any hint ...
> 
> 
> Thanks a lot
> Peter
> 
> 
> 
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Connect-to-external-database-tp7581689.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to