Source language: Translate to:

Troubles deleting records

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Troubles deleting records

Postby carlos torres » Mon Jan 21, 2013 12:37 pm

Dear NB Team

TIA

I've been working for a while with ms-access files, but when I tried to delete a record I got wierd message "To complex query to delete this record" I didn't nothing with the database. It is the standard function using dbpDeleteRecord
How it comes?

I will appreciate your help

regards,
carlost
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia

Re: Troubles deleting records

Postby carlos torres » Mon Jan 21, 2013 2:54 pm

I made some minor changes on the field names making them shorter as it is suggested on the SQL Tutorial then
I solved it using an SQL statetment and refreshing data after that instead of use dbpDeleteRecord "Alias" "MyTable"

Code: Select all
dbpExecSQL "Alias" "DELETE Field1, Field2|FROM Alias|WHERE (((HCO.Field1)=[#34][Alias.MyTable.Field1][#34]) AND ((Alias.Field2)=[#34][Alias.MyTable.Field2][#34]));" ""
  dbpRefresh "Alias" "MyTable"


Thanks
carlost
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia

Re: Troubles deleting records

Postby Neosoft Support » Wed Jan 23, 2013 11:27 am

Also, make sure your table has a primary key field. These types of errors are common with MS Access databases when a table does not contain a primary key field. The easiest way to resolve the problem is to add an auto increment field to the table and make it the primary key.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests

cron