Source language: Translate to:

Error Message with duplicate key

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Error Message with duplicate key

Postby carlos torres » Tue Jul 10, 2007 1:17 pm

Hi everybody

I create a table with an specific field as key.

When i test it duplicating the key dbp detect the duplicate record/key warning with a message.

i change the value and try to move forward/backward and dbp still remain with the last warning.... but when i restart the app the record was added to the table or the value is right.

it's a little bug?

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

Postby Neosoft Support » Tue Jul 10, 2007 5:49 pm

About 90% of the error messages you see are generated by the database engine, so I'm not sure exactly how best to handle situations like this. What the database is saying is that your edits violate the table's constraints. Different databases handle this error differently with different error messages.

Can you tell us what type of database you're using and what actions you took to duplicate a key and trigger the error?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

About warnings

Postby carlos torres » Tue Jul 10, 2007 6:19 pm

Dear Neosoft

I'm trying to use DB Access.
Code: Select all
dbpCreateAccessDatabase "[PubDir]DbLst.MDB" "Password=;Encrypted=Yes"
   dbpOpenAccessDatabase "DBLst" "[PubDir]DbLst.MDB" ""
   dbpCreateTable "DbLst" "Student" "Code String(15) PrimaryKey;LastName String(35);Names String(35)"


I'm still trying to understand the dbp behavior when handle db access...
1 - the parameter "encrypted" affect to whom? the data remains without change.
2 - when I delete all the records, nbp warns "dataset not in edit or insert mode"... How can I change this state.

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

Postby Neosoft Support » Wed Jul 11, 2007 10:28 am

1 - the parameter "encrypted" affect to whom? the data remains without change.


The Encrypted=Yes option physically encrypts the data stored inside the database. If you examine an encrypted database with a hex editor you will see that the data is not visible. The data in an unencrypted database can be viewed with a hex editor. Of course, an encrypted database without a password doesn't really do any good. To actually protect the database, you must use both encryption and a password.

2 - when I delete all the records, nbp warns "dataset not in edit or insert mode"... How can I change this state.


I wasn't able to reproduce the problem you described with the DeleteAll action. However, when using Text Entry Fields I was able to reproduce the problem you described with the duplicate key. This will be fixed before the final release.

One other thing I noticed with your sample code, was that you're using the reserved word "Names" as one of your field names. When I tried to run your create table code, I received an error message. Renaming the Names field to aNames solved the problem.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Neosoft Support » Fri Jul 13, 2007 5:30 pm

Carlos:

DBPro beta 2.3 should correct the duplicate key problem you reported.

http://www.neosoftware.com/forum/viewtopic.php?t=15314

Can you test it and let us know?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
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 1 guest