Source language: Translate to:

delete function

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

delete function

Postby Carl_SA » Tue Apr 08, 2008 2:45 am

Can anyone please help with the following:

When I try to delete a record from an Access Database I get the following error message:
"Key column information is insufficient or incorrect..........."

The commands preceding this simply open the database and the table.
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Gaev » Tue Apr 08, 2008 4:41 am

Carl_SA:

a) Download my AccessDBU utility program from http://www.scriptedlogic.com/AccessDBU.htm and see if you can delete a record from the same database/table using it instead of your application ... this should tell you if there is something unique about the table or just your program.

b) Does this happen if you try to do it within a separate 'test' pub ... where all you do is open the database, open the table and try to delete the record ? ... if so, you might want to provide a sample copy of the database and this pub file ... and also details of the command used to create the table (fields).
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Carl_SA » Tue Apr 08, 2008 5:47 am

Hi Gaev,

Have tried it in a completely simple separate application. Still same error. What i will try next is to create the database through Neobook. Previously I have created the database in Access.
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Carl_SA » Tue Apr 08, 2008 6:18 am

Have even tried to create an Access database using the Neobook functions. I get the same error when deleting data from a table. As mentioned before i have tried this in the simplest of applications with no functioanlity other than oepening the database then the table.
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Gaev » Tue Apr 08, 2008 6:38 am

Carl_SA:

a) What does your dbpCreateTable command look like ?

b) Did you try and delete a record using AccessDBU ?

c) Can you email a zip containing the mdb and the test pub ?
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Carl_SA » Tue Apr 08, 2008 6:44 am

Hi Gaev,

Will email to you. Appreciate the help on this. Really struggling here!
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Carl_SA » Tue Apr 08, 2008 6:58 am

Hi Gaev,

I seem to be able to duplicate the problem now. Whenever I try and capture data and do not use all the fields (leave some blank), the error will occur. When I use all the fields the error goes away. Is this normal?
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Gaev » Tue Apr 08, 2008 7:30 am

Carl_SA:
Is this normal?
No
Whenever I try and capture data
Can you be more specific/technical ... what command do you use to "capture" data ? ... what fields/field types in particular ?
.. and do not use all the fields (leave some blank), the error will occur. When I use all the fields the error goes away.
Are any of your Text or Picture objects associated directly with Table Field variables e.g. [myDB1.myTable2.myField3] ?
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Carl_SA » Tue Apr 08, 2008 9:08 am

Only have 5 fields. 3 integer and 2 memo. I make use of the built in buttons which Neobook offers when you open a table (clipboard). There is therefore no additional code from my side.
Of late I have been getting a number of "bookmark" errors. On the forum i see this has been reported on before (with no outcome).
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Neosoft Support » Tue Apr 08, 2008 10:23 am

The "Key column information is insufficient or incorrect..." message is coming from Access. This usually occurs because your table does not have a primary key field, which MS Access relies on for many tasks. You should be able to solve this error by making one of your fields a primary key. This is a quirk of client-server databases. I have found that Access works better when all tables have a primary key. The easiest way to do this is to use an AutoInc type field which will always be unique. You can add a new primary key field to an existing database using the action below:

dbpExecSQL "id" "ALTER table tablename ADD ID COUNTER;ALTER table tablename ADD PRIMARY KEY (ID)" ""

After adding the new field, close and run the publication again. Now the delete action should work correctly. This should also fix the bookmark problem.

Also, make sure you are using the latest version of NeoBookDBPro which is 1.1c.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Carl_SA » Tue Apr 08, 2008 11:25 am

thanks for this. I will make the changes and report back if there is a problem. I am using the latest version.
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest