cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting data through JDBC Adapter

Former Member
0 Kudos

Hi Hart Liu,

My system is on the latest patches of XI3.0 SP9. I am trying to insert some records into a database through JDBC adapter.

We have been facing with problem XSD structure in the jdbc side. We r manually created XSD structure. In the adapter engine we don’t have any action item. In u r mail

U r structure contains action attribute.

Can u plz help me out to generate the right XSD structure?

We have one more doubt, is there any automatically structure-generated option? plz let us know.......

We r waiting for u r reply....

Plz help me!!!!!!!!

Regards,

Anil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anil,

The structure of the data type for inserting data into DB should be

<name of data type>

<Statement>

<table name>

action(attribute)

<access>

<field 1>

<field 2>

.

.

.

<field n>

U can generate the xsd structure of the required table using xml spy and use that, instead of manually doing(which becomes very difficult in case of huge tables)

Hope it answers ur query.

Regards

Sunita

bhaskar_ghandikota
Participant
0 Kudos

Hello Sunita,

Thanks for the info.

I ama dding a little more info from Anil.

we are using XI 3 with Service Pack 09.

we are actually using a similar structure as below with Message Protocol being XML SQL Format:

We generated this thro XML SPY only.

This seems to be on par with your sugested format. But when we use this, JDBC throws error saying that acion item could not be found.

Please advise.

Thanks,

Bhaskar and Anil

<?xml version="1.0" encoding="ISO-8859-1"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<xs:element name="ACCOUNT_GROUP" type="xs:string" />

<xs:element name="AUTHORIZATION_GROUP" type="xs:string" />

<xs:element name="CITY" type="xs:string" />

<xs:element name="CITY_CODE" type="xs:string" />

<xs:element name="COMPANY_CODE" type="xs:string" />

<xs:element name="COUNTRY_CODE" type="xs:string" />

<xs:element name="COUNTRY_KEY" type="xs:string" />

<xs:element name="CUSTOMER_NUMBER">

<xs:simpleType>

<xs:restriction base="xs:string" />

</xs:simpleType>

</xs:element>

<xs:element name="DISTRICT" type="xs:string" />

<xs:element name="FAX_NUMBER" type="xs:string" />

<xs:element name="FIRST_NAME" type="xs:string" />

<xs:element name="HOUSE_NUMBER" type="xs:string" />

<xs:element name="INDUSTRY_KEY" type="xs:string" />

<xs:element name="INTIAL_CONTACT" type="xs:string" />

<xs:element name="LAST_NAME" type="xs:string" />

<xs:element name="POSTAL_CODE" type="xs:string" />

<xs:element name="REGION" type="xs:string" />

<xs:element name="TELEPHONE_NUMBER" type="xs:string" />

<xs:element name="resultset">

<xs:complexType>

<xs:sequence>

<xs:element ref="row" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="row">

<xs:complexType>

<xs:sequence>

<xs:element ref="CUSTOMER_NUMBER" />

<xs:element name="COUNTRY_KEY" type="xs:string" minOccurs="0" />

<xs:element name="FIRST_NAME" type="xs:string" minOccurs="0" />

<xs:element name="LAST_NAME" type="xs:string" minOccurs="0" />

<xs:element name="AUTHORIZATION_GROUP" type="xs:string" minOccurs="0" />

<xs:element name="INDUSTRY_KEY" type="xs:string" minOccurs="0" />

<xs:element name="ACCOUNT_GROUP" type="xs:string" minOccurs="0" />

<xs:element name="INTIAL_CONTACT" type="xs:string" minOccurs="0" />

<xs:element name="COMPANY_CODE" type="xs:string" minOccurs="0" />

<xs:element name="CITY" type="xs:string" minOccurs="0" />

<xs:element name="CITY_CODE" type="xs:string" minOccurs="0" />

<xs:element name="COUNTRY_CODE" type="xs:string" minOccurs="0" />

<xs:element name="DISTRICT" type="xs:string" minOccurs="0" />

<xs:element name="FAX_NUMBER" type="xs:string" minOccurs="0" />

<xs:element name="HOUSE_NUMBER" type="xs:string" minOccurs="0" />

<xs:element name="POSTAL_CODE" type="xs:string" minOccurs="0" />

<xs:element name="REGION" type="xs:string" minOccurs="0" />

<xs:element name="TELEPHONE_NUMBER" type="xs:string" minOccurs="0" />

</xs:sequence>

<xs:attribute name="action" use="optional" fixed="INSERT">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="INSERT" />

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

</xs:element>

</xs:schema>

Former Member
0 Kudos

I am using the home version of XML SPY. What are the steps to generate the SXD structure for a table?

Regards,

Chris

former_member185751
Contributor
0 Kudos

Hi,

I'm not sure whether this feature is available in home edition of XMLSPY. But if its available, inthe menu goto> "CONVERT">"Create XML Schema From DB Structure".

And just follow the screen instructions thereon. You may have to create DSN.

Regards,

Sridhar