473,372 Members | 924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

BOF and EOF record error

13
Hi VB experts

I have one problem while connecting database . when i run my form it shows the error BOF or EOF record error. but i entered data in database.
I used the condition

Do until rs.EoF=true

is it correct or wrong?
what i do for this problem? any one help me please?
Aug 29 '07 #1
8 2463
debasisdas
8,127 Expert 4TB
if u are moving through the recordset u need to check for BOF & EOF

if rs.bof =true then rs.movefirst

if rs.eof=true then rs.movelast


hope that helps you
Aug 29 '07 #2
deviii
13
Thanks for ur reply sir but it cant help me. please send the detailed coding
Aug 29 '07 #3
hariharanmca
1,977 1GB
Thanks for ur reply sir but it cant help me. please send the detailed coding

Expand|Select|Wrap|Line Numbers
  1. IF rstRecordSet.BOF = False Then    rstRecordSet.MovePrevious
  2.  
  3. IF rstRecordSet.EOF = False Then    rstRecordSet.MoveNext
I think this will help you.
Aug 29 '07 #4
pureenhanoi
175 100+
Hi VB experts

I have one problem while connecting database . when i run my form it shows the error BOF or EOF record error. but i entered data in database.
I used the condition

Do until rs.EoF=true

is it correct or wrong?
what i do for this problem? any one help me please?
"Do Until" routine always do all statements within Do Until...Loop. And then, it check the condition. If the condition still True, so do statements again. If the condition go to False, so exit routine.
Take a look at your code. If your SQL statement brings up a Null recordset (RecordCount = 0). So the code that get data from RS within Do Until routine goes fail.
To trap this error, you must check Null for Rs first
Expand|Select|Wrap|Line Numbers
  1. If rs.EOF Then Exit Sub     'do nothing if rs is null
  2. Do Until rs.EOF
  3. 'your statements go here
  4. Loop
  5.  
Or using another routine
Expand|Select|Wrap|Line Numbers
  1. Do While Not rs.EOF
  2. 'your statement goes here
  3. Loop
  4.  
or
Expand|Select|Wrap|Line Numbers
  1. While Not rs.EOF
  2. 'your statement goes here
  3. Wend
  4.  
Aug 29 '07 #5
deviii
13
hi pureenhanoi thanks now i got result
Aug 29 '07 #6
deviii
13
hello

now i got one more doubt how we can do repititive operation in MSHFlex grid control? for example i wany to enter value in one column the square value of that number will automatically displayed in next coumn what can i do for it? please help me
Aug 29 '07 #7
hariharanmca
1,977 1GB
hello

now i got one more doubt how we can do repititive operation in MSHFlex grid control? for example i wany to enter value in one column the square value of that number will automatically displayed in next coumn what can i do for it? please help me

Expand|Select|Wrap|Line Numbers
  1. msfGrigName.TextMatrix(<Row Number>, <Column>)
Aug 29 '07 #8
QVeen72
1,445 Expert 1GB
Hi deviii,

Check This:

Expand|Select|Wrap|Line Numbers
  1. Dim i As Integer
  2. For i = 1 To 10
  3.   Grd.Textmatrix(i, 1) = i
  4.   Grd.TextMatrix(I,2) =i * i
  5. Next
  6.  
REgards
Veena
Aug 29 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Hari Om | last post by:
Here are the details of my error log files: I execute the command and get following message at console: ---------------------------------------------------------------------- ../sqlldr...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
2
by: RC | last post by:
I am getting the following error message. "Write Conflict this record has been changed by another user since you started edting it. If you save the record, you will overwrite the changes...." I...
3
by: hebandgene | last post by:
When I delete a record in a subform I get the warning that I'm about to delete a record, followed by an error "No current record." When I click OK obviously the record is deleted and it goes to...
20
by: MS | last post by:
Access 97 I want to requery the data being displayed on a form, then I want to return to the record I was in. Why doesn't this code work? Private Sub CmdRefsh_Click()
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the...
4
by: Susan Bricker | last post by:
I have a command button on a form that is supposed to Delete the record being displayed. The record is displayed one to a form. The form is not a Pop-Up nor is it Modal. Tracing the btnDelete...
8
by: Tom | last post by:
Hi I have an aspx page which has javascript to configure xmldata. I added breakpoint to the button method. When I click submit button, it did not go to those breakpoint and show the following...
5
by: prakashwadhwani | last post by:
The Delete Event/Proc & "Save_Fields_In_Form_Header" Event/Proc in my form were working perfectly. However, after I added a call to the "Save_Fields_In_Form_Header" Event/Proc in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.