Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Message while inserting into the database 1

Status
Not open for further replies.

EH

Programmer
Sep 17, 2001
9
AU
Hi there

I am experiencing a problem where I have setup databases in paradox and I am now attempting to enter data onto the form. Once I press the button (to post) an error message appears.

The error message is:

"Project raised exception class eddatabase error with message 'name of the table' dataset not in edit or insert mode".

However, the code definitely has code to open table and set in insert mode.
 
In your button-click, put a breakpoint and check what the [YourQuery].State is - if it is dsEdit or dsInsert, you can post, if not it's already been posted.

Keep in mind that methods like Next and Prior automatically post the record.

TealWren
 
Are you using data aware components like dbedit or are you using an editfield with some custom code?

Regards S. van Els
SAvanEls@cq-link.sr
 
To S, van Els
Thankyou for your response.
Answer to your question is yes we are using an editfield with some custom code.
I hope this helps.

Rgds Erwin
 
I suggest to use a dbedit component, at least you do not have to worry about the link with your database.
You always can modify the on validate event, or write your own component descending it from Tdbedit. S. van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top