473,387 Members | 3,750 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,387 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 2464
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.