cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting Output from Database

Former Member
0 Likes
149

hi,

how to know the error occuring in database? for example i am inserting one no which is primary key in SQL. when i add that no again, SQL will show error? how can i capture this error message from HTML page? already i inserted datas using iCommand. if i add another user with same name, it should raise error? how to solve this? and also i typed as

var ir=document.<appletname>.getQueryObject()

then i inserting values.

and i typed as

if(ir.executeCommand())

{

alert("hi")

}

else{

alert("err")

}

it doesnt raise this alert message "hi" but it raise "err"

but in database it added the new value?

how to solve it?

- senthil

Accepted Solutions (0)

Answers (2)

Answers (2)

jcgood25
Active Contributor
0 Likes

Senthil,

If you are using FixedQuery for INSERT / UPDATE / DELETE database activity you need to use the Command mode for your query template.

The insert statement will work, but Query or FixedQuery mode expects a dataset to be returned from the database. In this case you need to use the Command mode.

Regards,

Jeremy Good

Former Member
0 Likes

Hi Senthil,

Try replacing the "alert('err')" in your code with "alert(ir.getLastError());". This will at least give you some idea of the problem. Also, you can check the xMII General log for any information that pertains to this issue.

I encourage you to post your issues a bit more clearly.