|
-
Apr 4th, 2005, 09:03 AM
#1
Thread Starter
Hyperactive Member
update error RESOLVED
"Either BOF or EOF is True, or the current record has been deleted.REquested operation requires a current record"
i have a datagrid...when i am testing the update option it seems to no longer be wrking. Basically i can a new row to the datagrid and want to save that....
i rs.addNew until the rs.RecordCounter = length off datagrid then
i copy what is in the 1st row of the datagrid to the rs and then rs.Update
rs.MoveNext until i copy them all.... but now it just gives me the above error after copying the 1st row
Last edited by pame1la; Apr 5th, 2005 at 10:46 AM.
-
Apr 4th, 2005, 09:20 AM
#2
Thread Starter
Hyperactive Member
Re: update error
how do i get top start at from the top of the rs nd work down bcos it is pointing at teh added line, and therefore thinks it EOF after copying line 1 and unable to copy the next lines!!!!
-
Apr 4th, 2005, 10:14 AM
#3
Thread Starter
Hyperactive Member
Re: update error
Do While Counter < (datagrid no of rows)
rs.AddNew
Counter = Counter + 1
Loop
am i allowed to add a blank line in a rs or do i ned to go depending on if columns r allowed nulls???
-
Apr 5th, 2005, 02:16 AM
#4
Re: update error
If some columns in your table are set as allownulls=false then you wouldnt be allowed to add an 'empty' record/row.
Perhaps you could make a clearer explanation of your problem so members here will be able to help you.
-
Apr 5th, 2005, 03:45 AM
#5
Thread Starter
Hyperactive Member
Re: update error
 Originally Posted by dee-u
.
Perhaps you could make a clearer explanation of your problem so members here will be able to help you.
sorry.... right i have an update option where the user searches for product and then updates it and saves it bak to the dbase...
Some of the data is held in a datagrid and the user is allowed to add new lines. This is what I am having a problem with... when the user updates by adding a new line on the record i am unable to save the new line into the dbase... and am getting errors.....
I have now ensured that any new added lines are no longer balnk but Im still getting an error,
"key column information is insufficient or incorrect. Too many rows will be affected by update"
what does that mean?????
-
Apr 5th, 2005, 04:43 AM
#6
Re: update error
I believe you violated rules in your columns like you inputted a 10 character string to a column which is defined with a size type as 7, etc... I just tried it and I also encountered the same problem with the situation I stated above.
-
Apr 5th, 2005, 04:48 AM
#7
Thread Starter
Hyperactive Member
Re: update error
mostly all the datatypes in the grid are money and the rest are int....
i only enter numbers so i not sure y its got this error!!!
-
Apr 5th, 2005, 04:50 AM
#8
Re: update error
Try to use the DataForm Wizard and emulate what you intend to do... Or perhaps you could post your attach your project (including database) so we could take a look at the problem....
-
Apr 5th, 2005, 05:11 AM
#9
Thread Starter
Hyperactive Member
Re: update error
that error appears on rs.MoveNext...... uodate hasn't even occured yet so y is it coming up wiv that error???
-
Apr 7th, 2005, 07:25 PM
#10
Re: update error RESOLVED
You have already reached the end of the recordset and yet you are still trying to movenext....
Here is an example of looping through a recordset....
VB Code:
Do while not recordset.eof
recordset.movenext
loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|