Error in inserting into Tamino database which has mapping to

Can anybody show how to insert into Tamino database which has mapping to SQL? I have a schema which has been defined successfully and records from SQL which has been mapped can be retrieved out using the query method. The only problem is when I tried to insert using the normal DOM method in java… ODBC error occurred.

Anybody has any examples on this?

I used this normal DOM method in java:

BasicDocument doc=new BasicDocument();
BasicElement prospect = new BasicElement(doc,“Contact”);
BasicElement c = new BasicElement(doc,“No.”);
c.appendChild(new BasicText(doc, prospectID));

c = new BasicElement(doc,“Name”);
c.appendChild(new BasicText(doc, name));

TaminoResult tr= tamino.insert(prospect);
System.out.println (tr.getReturnValue()+" "+tr.getMsgText()) ;



I have posted my schema as well…

Please help!

Thanks… :confused:
schmContact.TSD (2.31 KB)

What is the error that you get? If you try and store the document using the TII do you get the same error. I suspect you will in which case this is more of a X-Node related issue.

The error that I received is ODBC error occurred when I try to use the java api method to insert into Tamino.

There is no problem when I insert directly into Tamino Interactive Interface. The insert can be done well.

I wanted to post this question to the X-NODE section but i am now using java api to insert into tamino but having a schema mapping to SQL.

I thought it should be done the same way for inserting but it seems to be having error. Before this, I have a schema which do not have any mapping to other database. Inserting using java api can be done perfectly. Inserting fails only when using schema which has a mapping to SQL (or maybe to other databases as well)…

Please help. Or maybe you have any idea how to insert into tamino using java api where the schema has a mapping to SQL (using XNDODE).

What you are doing seems correct but its difficult because there is only a fragment of the code posted. By the way I just noticed that your not using the Tamino API for Java but the HTTP Client API for Java (TaminoClient).

What would be useful for diagnosing the problem would be to enable tracing. This can be done using:
where tamino is the TaminoClient object.

This will output a trace of the HTTP communication and hopefully this may reveal something. If you cannot see anything obvious you can copy the output to a file and post it back into this thread.

When I set the method: tamino.setTrace(true); - I got this output in my screen…

baseUrl :
query : _DISCONNECT=*&_sessionid=11&_sessionkey=31693
Open Connection
Open finish
null = HTTP/1.1 200 OK
Server = Microsoft-IIS/5.0
Date = Tue, 08 Oct 2002 02:19:21 GMT
Content-Length = 309
X-INO-Version =
X-INO-Sessionid = 11
X-INO-Sessionkey = 7825
Cache-Control = no-cache
Content-Type = text/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8" ?><ino:response xmlns:ino=“http://namespace” xmlns:xql=“” ino:s
essionid=“11” ino:sessionkey=“7825”><ino:message ino:returnvalue=“0”><ino:messag
eline>session 11 ended</ino:messageline></ino:message></ino:response>

Transaction : &_sessionid=11&_sessionkey=31693


anything wrong with the output… can somebody help?

I managed to insert to Tamino. What I have realised is that the columns in SQL cannot accept NULL value and that is why I can’t insert in a proper way.

Thanks anyway for your advice.