Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Error when trying to delete record

Locked
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Error when trying to delete record

Unread post by Fike »

Hello,

I am using the latest version of nuBuilder. I used the new subfrom feature (Browse in subform) in one of my forms, but now when I try to delete a record on that form I get the following error message:


SQL
DELETE FROM WHERE = '14fc77244c6808'

Transaction
No Transaction.


Error
1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE = '14fc77244c6808'' at line 1

I removed the subform and then I was able to delete records on that form with no error message.

Is there a workaround to keep the subform with the "Browse in subform" feature and being able to delete records from that form?

Regards!

Fike
shane
Posts: 100
Joined: Mon Jun 15, 2009 10:04 am

Re: Error when trying to delete record

Unread post by shane »

your SQL is missing the table name, can you provide more info as to how the form and subform is setup
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Error when trying to delete record

Unread post by Fike »

Hi Shane,

To setup the subform, I filled the 'Browse in Subform' and 'Default Filter for Browse Screen' fields, and I left blank the 'Table', 'Primary Key', 'Foreign Key', and 'SQL' fields.

I thought it was not necessary to fill these fields since I just wanted to use the subform to browse some records (using the new feature of the 2.6 version of nuBuilder).

However the problem arises when trying to delete a record of the form. As you mentioned, nuBuilder will not find the table name of the subform to erase also the records of the subform related to the form's record, since I left blank those fields.

I just filled the 'Table', 'Primary Key', 'Foreign Key', and 'SQL' fields of the subform and the problem disappeared.

Thank you very much!

Regrads,

Fike
shane
Posts: 100
Joined: Mon Jun 15, 2009 10:04 am

Re: Error when trying to delete record

Unread post by shane »

Thank for your feedback we will look further into the documentation to make this clearer in the further
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Error when trying to delete record

Unread post by admin »

Fike,

Thanks for all your info.

We've fixed that bug and it will come out soon in version 2.71.

In the mean time you can replace formdelete.php with this once attached in a zip.

Steven
You do not have the required permissions to view the files attached to this post.
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Error when trying to delete record

Unread post by Fike »

Thanks a lot Steven!

I will replace it righ tnow

Regards

Fike
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Error when trying to delete record

Unread post by admin »

.
Locked