XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Homer NajafiSubject: How to Insert To DB with Java
Author: Homer Najafi
Date: 12 Jun 2006 02:07 PM
Hi All,

I am trying to convert a CSV file to XML (calling adaptor from java; already done this part) and then insert the generated XML file to a DataBase (Insert). Can someone points me to the right direction please (or a sample code even better). I can call a Query (Select) file (.rdbxml) file from Java but I can't do INSERT. I saw a movie clip teach you how to do it with with WebServices and XSLT but mine is a simple Console app with no XSTL.

Thanks in advance,

Homer

Postnext
Ivan PedruzziSubject: How to Insert To DB with Java
Author: Ivan Pedruzzi
Date: 15 Jun 2006 04:36 PM

Homer,

Please take a look to the chapter "Composing SQL/XML in Stylus Studio" in the product documentation.

Once you have defined the UPDATE part of your DB to XML Data Source you will be able to write XML into StylusFile OutputStream (StylusFile.getOutputStream())

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Homer NajafiSubject: How to Insert To DB with Java
Author: Homer Najafi
Date: 16 Jun 2006 03:38 PM
Thanks Ivan. Is there any full example somewhere? I thought this is one of the major job people want to do with XML and Stylus.

I wanted to try your suggestion but I am keep getting following error message when I try to connect to DB2:

[StylusStudio][DB2 JDBC Driver]Unsupported VM encoding Cp500.


I am getting it after installing Stylus Release 3. I have jdk/jre 1.5.0_07 Multi-Language (that's the only one on Sun's site; no English-only; so the language is not the problem).

Any Idea?


Thanks,


Homer

Postnext
Ivan PedruzziSubject: How to Insert To DB with Java
Author: Ivan Pedruzzi
Date: 16 Jun 2006 03:51 PM
Please verify which JVM version Stylus Studio is using
(help -> about)?

Could you please check if under c:\Program Files\Java\jre1.5.0_06\lib
you have a file called charsets.jar?
If you don't you jave to re-install the JRE and during the process you need to turn on "support for additional languages".

Thank You for your help
Ivan Pedruzzi
Stylus Studio Team

Postnext
Minollo I.Subject: How to Insert To DB with Java
Author: Minollo I.
Date: 16 Jun 2006 04:50 PM
Take a look at the video referenced here:
http://www.stylusstudio.com/SSDN/default.asp?action=9&read=4754&fid=23

Postnext
Homer NajafiSubject: How to Insert To DB with Java
Author: Homer Najafi
Date: 19 Jun 2006 09:17 AM
Hi Minollo,

I've seen this clip already. The scenario I have is much simpler than this. No Web Services and no XSL. It's how to insert/update records in database from existing XML file.


Homer

Postnext
Minollo I.Subject: How to Insert To DB with Java
Author: Minollo I.
Date: 19 Jun 2006 09:25 AM
The concept is the same; provided that the XML is in the format the SQL/XML update portion expects (or that you created an XSLT/XQuery to make it look like what's expected), then you should be able to follow the same procedure.

Posttop
Homer NajafiSubject: How to Insert To DB with Java
Author: Homer Najafi
Date: 19 Jun 2006 09:32 AM
Any example by any chance? I am not looking for the whole procedure. I am just looking for: how you call your Update Adaptor from Java.

Ivan was talking about StylusFile.getOutputStream(). Not really clear (Though, I will try it today).

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.