i'm not able to execute delete query in nodejs pgm used with profoundjs
i have used simply pjs.query("myquery");
but when i check the record in db table it is still there
i dont know what is happening here
delete sql query
-
- New User
- Posts: 1
- Joined: Tue Mar 05, 2019 2:11 am
- First Name: gajender
- Last Name: tyagi
- Company Name: programmers.io
- Phone: 09785374546
- Address 1: lalkothi
- Address 2: jaipur
- City: jaipur
- State / Province: Rhode Island
- Zip / Postal Code: 302015
- Country: India
- Contact:
- Kaylee Law
- Profound Logic Staff Member
- Posts: 13
- Joined: Mon Sep 18, 2017 11:36 am
- First Name: Kaylee
- Last Name: Law
- Company Name: Profound Logic
- Contact:
Re: delete sql query
Hello Gajender,
In Profound.js commit control is turned on by default, what is most likely happening is that your delete query is not being committed properly before the module ends, therefore the delete statement is being reverted. There are several ways you can correct this:
You can find more information on setConnectAttr() here: http://www.profoundlogic.com/docs/pages ... d=31260795 and you can find more information on the connectionDetials config option here: http://www.profoundlogic.com/docs/displ ... ionDetails.
In Profound.js commit control is turned on by default, what is most likely happening is that your delete query is not being committed properly before the module ends, therefore the delete statement is being reverted. There are several ways you can correct this:
- You can issue a commit transaction via SQL to finalize all changes.
- You can append the SQL clause "with nc;" to the end of your SQL statement to cause that statement to run without commit control.
- You could use the pjs.setConnectAttr() api or the connectionDetails configuration option to set the SQL variable 'SQL_ATTR_COMMIT' to 'SQL_TXN_NO_COMMIT'. This will change the SQL connection to no longer use commit control on the SQL statements for as long as that connection stays open.
You can find more information on setConnectAttr() here: http://www.profoundlogic.com/docs/pages ... d=31260795 and you can find more information on the connectionDetials config option here: http://www.profoundlogic.com/docs/displ ... ionDetails.
Kaylee Law
Technical Support Specialist
Profound Logic Software
Technical Support Specialist
Profound Logic Software
Who is online
Users browsing this forum: Bing [Bot] and 0 guests