New User Request Assistance -
08-14-2003
, 07:06 PM
Codebase Version 6.5
Operating Systems XP Pro SP1
Programming Language VB6 SP5
Problem: I've built a table in Foxpro 3 with a single index. I
figured out how to open everything and perform a seek that is
returning a successful find but I can't figure out how to read the
fields for that record, also does anyone know where to find a
description of what all the different bas file show in the examples
folder. Thanks in advance for any help. My code follows.
Private Sub CheckIfValid()
'Field structure pointers
Dim pUserID As Long
Dim pPassword As Long
Dim pIndex As Long
Dim strStatus As String
Dim strPswd As String
db = d4open(cb, dataPath & "security") 'Open datafile
If db = 0 Then
MsgBox "Security Database would not open.", vbCritical,
"Program Abend"
Unload Me
End If
'Set Index
pIndex = d4tag(db, "USERID")
Call d4tagSelect(db, pIndex)
rc = d4seek(db, UCase(txtUserID))
Call SeekStatus(rc, strStatus)
If rc = r4success Then
' Call f4assign(pPassword, strPswd)
' strPswd = f4str(pPassword)
MsgBox strPswd
Else
MsgBox "Seek Returned " & strStatus
End If
rc = d4close(db) 'close table
End Sub |