18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Not able to execute the specific SQL query
while executing below mentioned query ,it is not executing and showing "stop playback failure" when we are playing through sahi contrioller.
But if am commenting this query line the script is working fine.
Please let me know that if there any special character reason is behind of it.which leds it's to failure.
SQL QUERY :
Insert into FT_T_MDDF (MODL_ID, START_TMS, MODL_TYP, TMPLT_MNEM, DFLT_IND, END_TMS, LAST_CHG_TMS, LAST_CHG_USR_ID, MODL_NME, MODL_DESC, MODL_SCHEMA, SPD_SCRN_DEF_SCHEMA, IGNORE_PROC_IND, BASE_MODL_ID, BASE_MDDF_START_TMS, BUS_ENTITY_NME, BUS_ENTITY_VER_ID) Values ('EQUITY', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'NTDF_MDL', NULL, 'Y', NULL, TO_DATE('11/09/2011 16:43:44', 'MM/DD/YYYY HH24:MI:SS'), 'SYSTEM', 'Notification Definition Model', 'Notification Definition Model Description', '<?xml version="1.0" encoding="UTF-8"?> <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="NTDF_MDL" xsi:noNamespaceSchemaLocation="../../schemas/Model.xsd" headerInfoXPath="concat(''Appl Id - '',/root/ntdf/ntdf.appl_id,''/'',''Part Id - '',/root/ntdf/ntdf.part_id,''/'',''Notification Id - '',/root/ntdf/ntdf.notfcn_id)"> <occurrence id="NTDF_MDL" table="ft_t_ntdf"> <inputFields> <field name="ft_t_ntdf.appl_id"/> <field name="ft_t_ntdf.dflt_severity_cde"/> <field name="ft_t_ntdf.excp_typ"/> <field name="ft_t_ntdf.notfcn_id"/> <field name="ft_t_ntdf.part_id"/> <field name="ft_t_ntdf.rsolut_typ"/> </inputFields> </occurrence> <occurrence table="ft_t_ntpm" id="NTPM" parentId="NTDF_MDL" label="Notification Parameter"> <inputFields> <field name="ft_t_ntpm.parm_nme"/> <field name="ft_t_ntpm.parm_desc"/> </inputFields> </occurrence> <occurrence table="ft_t_ntxt" id="NTXT" parentId="NTDF_MDL" label="Notification Text"> <inputFields> <field name="ft_t_ntxt.nls_cde"/> <field name="ft_t_ntxt.notfcn_long_txt"/> <field name="ft_t_ntxt.notfcn_short_txt"/> <field name="ft_t_ntxt.usr_cat_typ"/> <field name="ft_t_ntxt.notfcn_extnd_txt"/> </inputFields> </occurrence> <occurrence table="ft_t_ntrs" id="NTRS" parentId="NTDF_MDL" label="Suggested Resolution"> <inputFields> <field name="ft_t_ntrs.nls_cde"/> <field name="ft_t_ntrs.suggest_long_txt"/> <field name="ft_t_ntrs.suggest_extnd_txt"/> <field name="ft_t_ntrs.usr_cat_typ"/> </inputFields> </occurrence> <occurrence table="ft_t_ntkb" id="NTKB" parentId="NTDF_MDL" label="Notification Knowledge Base" multiple="true"> <defaultFields> <field name="ft_t_ntkb.part_id" valueOf="ft_t_ntdf.part_id" srcOccurrence="NTDF_MDL" keepInSync="true"/> <field name="ft_t_ntkb.appl_id" valueOf="ft_t_ntdf.appl_id" srcOccurrence="NTDF_MDL" keepInSync="true"/> <field name="ft_t_ntkb.notfcn_id" valueOf="ft_t_ntdf.notfcn_id" srcOccurrence="NTDF_MDL" keepInSync="true"/> </defaultFields> <inputFields> <field name="ft_t_ntkb.notfcn_knowledge_dtl_txt"/> <field name="ft_t_ntkb.notfcn_knowledge_titl_txt"/> <field name="ft_t_ntkb.start_tms"/> </inputFields> </occurrence> <relations/></model>', NULL, 'Y', NULL, NULL, NULL, NULL);
But if am commenting this query line the script is working fine.
Please let me know that if there any special character reason is behind of it.which leds it's to failure.
SQL QUERY :
Insert into FT_T_MDDF (MODL_ID, START_TMS, MODL_TYP, TMPLT_MNEM, DFLT_IND, END_TMS, LAST_CHG_TMS, LAST_CHG_USR_ID, MODL_NME, MODL_DESC, MODL_SCHEMA, SPD_SCRN_DEF_SCHEMA, IGNORE_PROC_IND, BASE_MODL_ID, BASE_MDDF_START_TMS, BUS_ENTITY_NME, BUS_ENTITY_VER_ID) Values ('EQUITY', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'NTDF_MDL', NULL, 'Y', NULL, TO_DATE('11/09/2011 16:43:44', 'MM/DD/YYYY HH24:MI:SS'), 'SYSTEM', 'Notification Definition Model', 'Notification Definition Model Description', '<?xml version="1.0" encoding="UTF-8"?> <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="NTDF_MDL" xsi:noNamespaceSchemaLocation="../../schemas/Model.xsd" headerInfoXPath="concat(''Appl Id - '',/root/ntdf/ntdf.appl_id,''/'',''Part Id - '',/root/ntdf/ntdf.part_id,''/'',''Notification Id - '',/root/ntdf/ntdf.notfcn_id)"> <occurrence id="NTDF_MDL" table="ft_t_ntdf"> <inputFields> <field name="ft_t_ntdf.appl_id"/> <field name="ft_t_ntdf.dflt_severity_cde"/> <field name="ft_t_ntdf.excp_typ"/> <field name="ft_t_ntdf.notfcn_id"/> <field name="ft_t_ntdf.part_id"/> <field name="ft_t_ntdf.rsolut_typ"/> </inputFields> </occurrence> <occurrence table="ft_t_ntpm" id="NTPM" parentId="NTDF_MDL" label="Notification Parameter"> <inputFields> <field name="ft_t_ntpm.parm_nme"/> <field name="ft_t_ntpm.parm_desc"/> </inputFields> </occurrence> <occurrence table="ft_t_ntxt" id="NTXT" parentId="NTDF_MDL" label="Notification Text"> <inputFields> <field name="ft_t_ntxt.nls_cde"/> <field name="ft_t_ntxt.notfcn_long_txt"/> <field name="ft_t_ntxt.notfcn_short_txt"/> <field name="ft_t_ntxt.usr_cat_typ"/> <field name="ft_t_ntxt.notfcn_extnd_txt"/> </inputFields> </occurrence> <occurrence table="ft_t_ntrs" id="NTRS" parentId="NTDF_MDL" label="Suggested Resolution"> <inputFields> <field name="ft_t_ntrs.nls_cde"/> <field name="ft_t_ntrs.suggest_long_txt"/> <field name="ft_t_ntrs.suggest_extnd_txt"/> <field name="ft_t_ntrs.usr_cat_typ"/> </inputFields> </occurrence> <occurrence table="ft_t_ntkb" id="NTKB" parentId="NTDF_MDL" label="Notification Knowledge Base" multiple="true"> <defaultFields> <field name="ft_t_ntkb.part_id" valueOf="ft_t_ntdf.part_id" srcOccurrence="NTDF_MDL" keepInSync="true"/> <field name="ft_t_ntkb.appl_id" valueOf="ft_t_ntdf.appl_id" srcOccurrence="NTDF_MDL" keepInSync="true"/> <field name="ft_t_ntkb.notfcn_id" valueOf="ft_t_ntdf.notfcn_id" srcOccurrence="NTDF_MDL" keepInSync="true"/> </defaultFields> <inputFields> <field name="ft_t_ntkb.notfcn_knowledge_dtl_txt"/> <field name="ft_t_ntkb.notfcn_knowledge_titl_txt"/> <field name="ft_t_ntkb.start_tms"/> </inputFields> </occurrence> <relations/></model>', NULL, 'Y', NULL, NULL, NULL, NULL);
Comments
You need to first connect to the DB and then work with it.
Kindly have a look at : http://sahi.co.in/w/_getDB
Let me know if you face any issue.
Regards
Sumitra
I have already established the sucessful db connection and all my sql statements are working fine except the one mentioned
can you please help let us know is there any specific character or some other issue in that insert statement which makes it not executable?
Instead of passing all the values at a time , could you try passing each one of them separately and check which part of the query is causing the problem.
Regards
Sumitra
As we are inserting data in only one table, we cant pass valve in one column at a time since rest columns are not nullable .
But i think value present in column MODL_ID can have an issue as it has an xml tags in it and the value is also very long.
Is there any value character lenghth or alphabet limitation while executing through sahi.
Since when we execute this query manually through toad it's working fine
If this query works otherwise, there could be a problem in the way you are using it through Sahi.
This works for me. I escaped all the double quotes while executing the query.
Let me know if this helps.
Regards,
dkulkarni