1

ねえ、私はパスワードチェンジャーに取り組んでいます。ユーザーは(正常に)ログインし、ユーザーのイニシャルを含むグローバル変数をロードしてから、パスワードの有効期限が切れたフォームを起動します。パスワードの有効期限が切れたフォームでこれらのイニシャルを使用して、DBからユーザー情報を取得しようとしています。

vaUserLog.FieldValue("USERINIT") = UserInitials
vaUserLog.GetEqual
vaStat = vaUserLog.Status

vaStatは4のエラーを出し続けます。私はpervasivev9を使用しています。VAとの接続は次のようになります。

With vaUserLog
        .RefreshLocations = True
        .DdfPath = DataPath
        .TableName = "USERLOG"
        .Location = "USERLOG.MKD"
        .Open
        If .Status <> 0 Then
           ErrMsg = "Error Opening File " + .TableName + " - Status " + str$(.Status) + vbCrLf + "Contact IT Department"
        End If
    End With

DBテーブルでは、USERINITはChar、3です。UserInitialsは文字列です。

おそらく小さなものが欠けていますが、今は考えられません。どんな助けでもありがたいです。Lemmeは、さらに情報が必要かどうかを知っています。

乾杯

4

1 に答える 1

1

Status 4 means that the record could not be found. In your case, it could be the case of the value being searched is wrong, there's a different padding (spaces versus binary zero), or that the UserInitials value just isn't in the data file. You can use MKDE Tracing to see what's actually being passed to the PSQL engine. Once you've done that, make sure the value you're using works through the Function Executor where you can open the file and perform a GetEqual.
Here are my suggestions: - Make sure you're pointing to the right data files. - Make sure you're passing the right value into the GetEqual (by setting the FieldValue).

于 2011-06-30T17:51:23.223 に答える