Problem with ADO Control - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Problem with ADO Control

Hi ,

The scenario is like this ,

We can use the Adodc control to move forward or backward to view the records in the database using the left or right arrows embedded with the control. I have set the property of BOF to 0 - adDoMoveFirst and the property of EOF action to

2 - adDoAddNew . Simply with the BOF setting , I will not let the user move beyond the First Record . As for EOF setting , I will allow the user to insert a new record simply by scolling past the end of the queue .The problem occurs when I try to insert the new record through the Adodc control as the method I have mentioned above. At this time , when I have decided to return back to the prior records using my Adodc control by clicking on the left arrow. I will be prompt with this warning message

" Cannot Insert an empty row - must have at least one column value set " . Now I am force to enter some data in the current recordset . Only then will I be able to return back to the prior records. I have no other way out .



Therefore , may I know would it be possible for me to return back to the prior record. Thanks


Comments

  • : Hi ,

    : The scenario is like this ,

    : We can use the Adodc control to move forward or backward to view the records in the database using the left or right arrows embedded with the control. I have set the property of BOF to 0 - adDoMoveFirst and the property of EOF action to

    : 2 - adDoAddNew . Simply with the BOF setting , I will not let the user move beyond the First Record . As for EOF setting , I will allow the user to insert a new record simply by scolling past the end of the queue .The problem occurs when I try to insert the new record through the Adodc control as the method I have mentioned above. At this time , when I have decided to return back to the prior records using my Adodc control by clicking on the left arrow. I will be prompt with this warning message

    : " Cannot Insert an empty row - must have at least one column value set " . Now I am force to enter some data in the current recordset . Only then will I be able to return back to the prior records. I have no other way out .

    :

    : Therefore , may I know would it be possible for me to return back to the prior record. Thanks

    :



    You need to undo (or clear) the new record creation. Some data must be getting into the record and therefore Access has started to create the record but has not added it to the table. WHen you try to go back, Access sees an error most likely with the primary key and is giving you the message. Basically, do the equivalent of the hitting the escape key.






Sign In or Register to comment.