VB6错误:运行时错误3021. BOF或EOF为真或当前记录已被删除。请求的操作需要当前记录

时间:2015-10-13 18:09:12

标签: vb6

这是我的代码:

VB6 Error: Runtime error 3021. Either BOF or EOF is true or the current record has been deleted. Requested operation requires a current record. 

这是我在运行时收到的错误:

#!/bin/sh
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

# This script runs tests before any push to the MASTER branch and fails
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
echo "Current branch: "$current_branch
if [ $current_branch = "master" ]
then
    echo "Pushing to MASTER branch requires tests to pass..."
    ./run.sh test
    if [ $? = 0 ]
    then
        exit 0
    else
        echo "***ERROR> Failed to pass tests! Get tests to pass and then try again..."
        exit 1
    fi
else
    echo "Skipping tests since we're not pushing to MASTER..."
fi

我已经有了其他问题,我在这些已经解决的问题上找不到答案,因为这是在VB6中。我还提到过,当我点击调试时,我会在哪收到错误。 TIA

1 个答案:

答案 0 :(得分:1)

如果返回任何记录集,新记录集将已存在于第一条记录中。你不需要

Form6.Adodc1.Recordset.MoveFirst `ERROR

确实是因为没有返回记录而导致错误,因此没有第一个记录要移动到。如果你在那一行检查BOF,你会发现BOF和EOF都是真的。