Can't delete the record. It's being used.

57 views
Skip to first unread message

Drazen D. Babic

unread,
Nov 17, 2021, 5:10:52 AM11/17/21
to Jam.py Users Mailing List
Hi Andrew, 

for the interested readers, could you please suggest the best way of deleting the records with FK?
Any table referencing other tables with FK will raise the above error, and won't be deleted.

Cheers

D.

Andrew Yushev

unread,
Nov 17, 2021, 3:23:21 PM11/17/21
to Drazen D. Babic, Jam.py Users Mailing List
Hi, Drazen

To delete such a record you have to remove any references to it.
For example, the invoices item has a customer field and a FK index on it.
If invoices have an invoice with this customer the database won't allow you to delete 
this customer.

Regards,
Andrew Yushev

ср, 17 нояб. 2021 г. в 13:10, Drazen D. Babic <bab...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jam-py/a62911c5-5abd-47f6-8dad-596e2fbcaeccn%40googlegroups.com.

Yeoresley Dominguez

unread,
Nov 17, 2021, 5:31:26 PM11/17/21
to Jam.py Users Mailing List
good afternoon
as I always need from you
could you help me?
I need to know how I can use the "select count (distinct ..." function when grouping and using functions in reports.
Cheers

Andrew Yushev

unread,
Nov 22, 2021, 1:51:56 AM11/22/21
to Yeoresley Dominguez, Jam.py Users Mailing List
Hi, Yeoresley

I think it is better to create a connection to the database using the connect method of the task
execute an SQL query and use results in the report.

Regards,
Andrew Yushev 

чт, 18 нояб. 2021 г. в 01:31, Yeoresley Dominguez <yeoresl...@outlook.com>:
--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages