473,396 Members | 1,933 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,396 software developers and data experts.

Either BOF or EOF is True, or the current Record has been deleted

I have error message when i run this script

QuerySelect = "SELECT a.DN, b.DIN, c.PIN, " & _
"c.UserName, b.Clock, d.ItemName " & _
"FROM ((ras_Device a INNER JOIN ras_AttRecord b ON a.DN=b.DN) " & _
"LEFT JOIN ras_Users c ON b.DIN=c.DIN) " & _
"LEFT JOIN ras_AttTypeItem d ON b.AttTypeId=d.ItemId " & _
"WHERE b.DIN=c.DIN"
Set rsDataRAS = da_GetRs(QuerySelect)

QuerySelectSIKawan = "SELECT * FROM " _
& "finger_data_karyawan"
Set rsSIKawan = da_GetRecord(QuerySelectSIKawan)

datetimeOut = rsSIKawan!TimeOut >>> debug here
rsSIKawan.Close

rsSQL.CursorLocation = adUseClient

With rsSQL.Fields
.Append "idNo", adInteger
.Append "device", adInteger
.Append "idFinger", adInteger
.Append "nikKary", adVarChar, 50
.Append "namaKary", adVarChar, 100
.Append "time", adDate
.Append "tipeAbsen", adVarChar, 64
End With

rsSQL.Open

If rsDataRAS.RecordCount > 0 Then
jlhField = 0

While Not rsDataRAS.EOF Or rsDataRAS.BOF

rsSQL.AddNew
rsSQL("idNo").Value = jlhField + 1
rsSQL("device").Value = rsDataRAS("DN").Value 'field device
rsSQL("idFinger").Value = rsDataRAS("DIN").Value 'field finger ID
rsSQL("nikKary").Value = rsDataRAS("PIN").Value 'field nik karyawan
rsSQL("namaKary").Value = rsDataRAS("UserName").Value 'field nama karyawan
rsSQL("time").Value = rsDataRAS("Clock").Value 'field waktu
rsSQL("tipeAbsen").Value = rsDataRAS("ItemName").Value 'field tipe waktu

rsSQL.Update
rsDataRAS.MoveNext
jlhField = jlhField + 1

If datetimeOut = "" _
Then
QueryUpdateSIKawan = "UPDATE finger_data_karyawan SET " _
& "TimeOut='" & Format(rsSQL("time").Value, "mm/dd/yyyy hh:nn:ss") & "'" _
& "WHERE Device='" & rsSQL("device").Value & "' AND " _
& "idFinger='" & rsSQL("idFInger").Value & "' AND " _
& "NIKKary='" & rsSQL("nikKary").Value & "' AND " _
& "NamaKary='" & rsSQL("namaKary").Value & "' AND " _
& "TglHadir='" & Format(rsSQL("time").Value, "mm/dd/yyyy") & "'" _
& "AND TimeIn='" & Format(rsSQL("time").Value, "" _
& "mm/dd/yyyy h:mm:ss") & "' AND TipeAbsen = " _
& "'" & rsSQL("idFInger").Value & "'"
Call ExeQUERY(QueryUpdateSIKawan)
Else
QueryInsertSIKawan = "INSERT INTO finger_data_karyawan " _
& "(idNo, Device, idFinger, NIKKary, NamaKary, " _
& "TglHadir, TimeIn, TipeAbsen) " _
& "VALUES('" & rsSQL("idNo").Value & "', '" & rsSQL("device").Value & "', " _
& "'" & rsSQL("idFinger").Value & "', '" & rsSQL("nikKary").Value & "', " _
& "'" & rsSQL("namaKary").Value & "', " _
& "'" & Format(rsSQL("time").Value, "mm/dd/yyyy") & "', " _
& "'" & Format(rsSQL("time").Value, "mm/dd/yyyy h:mm:ss") & "', " _
& "'" & rsSQL("tipeAbsen").Value & "')"
Call ExeQUERY(QueryInsertSIKawan)
End If

DoEvents
Wend

End If


Can anyone help me?

Regards,
Octo
Oct 7 '10 #1
1 2072
Stewart Ross
2,545 Expert Mod 2GB
It suggests that your function da_GetRecord(QuerySelectSIKawan) is returning an empty recordset, in which case the error message is absolutely correct (as both EOF and BOF are true if there are no records in the recordset).

You don't show us da_GetRecord, so there is no more I can do at this stage to help. I'd suggest that you will need to set suitable breakpoints and walk through the function line by line to see why there are no records being returned.

-Stewart
Oct 9 '10 #2

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

Similar topics

3
by: Maria | last post by:
Is there another way to delete the current record in a subform from the main form, another subform or a sub-subform other than setting focus on a field in the subform and using run command...
3
by: Prakash | last post by:
Below is my code to delete a record in a continuous form. I can't figure out any reason but sometimes (another) record gets deleted instead of where the record pointer is positioned. Small table...
6
by: jpatchak | last post by:
Hello, I have a main form with one subform. I have a command button on the main form to delete the current record. Below is my code. The tables on which the main form and subform are based...
3
by: Kosmos | last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked...
3
by: marcf | last post by:
Hi Everyone, Hopefully someone will be able to offer a suggestion to this problem. I have a multi user CMS running at work which I wrote. Aside from a few bugs everything has been going fine...
1
by: THEAF | last post by:
i'm trying to create a reminder form, when i add a new reminder its ok but when i try to delete a reminder then i get No Current Record problem. Form Load Private Sub Form_Load() Dim s() As...
5
by: TimSki | last post by:
Hi, This is very strange... I have a simple query using a recordset thus... set rsID = CreateObject("ADODB.recordset") searchPhrase = "SELECT blah...." rsID.Open searchPhrase, oConn
1
vikas251074
by: vikas251074 | last post by:
Hello sir, I am facing some problem for which I am trying hard to solve it. But in vain. This programe is for View/Deletion. When I run program for first time, I select vlan from list and press...
4
by: jbrumbau | last post by:
Hello, I have a function that goes through each field in a form and checks if it was changed between itself and the existing recordset. It is used to track changes done in any record when the...
0
by: ramachandradurai | last post by:
hi, i am getting the error like.. Either EOF or BOF is true, or the current record has been deleted.Requested operation requires the current data. <%@ LANGUAGE="VBSCRIPT" %>...
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: 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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.