on ‎2007 Jun 12 9:52 AM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.