Run- time error '-2147467259 (80004005)' Could not find file Account.mdb

  • Thread starter Thread starter Geniustarun
  • Start date Start date
G

Geniustarun

Guest
Hii all this is my lab program (vb program to validate the user name and password from the database and display the appropriate message) use Data control

i getting Run- time error -2147467259 (80004005) Could not find file C:\Program Files (x86)Microsoft Visual Studio\VB98\Account.mdb

My code is

Dim rs As New ADODB.Recordset
Dim conn As New ADODB.Connection
Private Sub cmdexit_Click()
MsgBox "do u really want to exit", vbInformation + vbOKOnly, "login"
If vbOK Then
End
End If
End Sub
Private Sub cmdlogin_Click()
If Text1.Text = "" Then
MsgBox "enter the username", vbInformation + vbOKOnly, "login"
Text1.SetFocus
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "enter the password", vbInformation + vbOKOnly, "login"
Text2.SetFocus
Exit Sub
End If
If Text1.Text <> "" And Text2.Text <> "" Then
If rs.State = 1 Then
rs.Close
Else
rs.Open "select * from login where username=" & Text1 & " and password= " & Text2 & " ", conn, adOpenDynamic, adLockOptimistic, adCmdText
End If
If rs.EOF = True Then
MsgBox "invalid username and password", vbCritical + vbOKOnly, "login"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
MsgBox "username and password correct", vbInformation + vbOKOnly, "login"
End If
End If
End Sub
Private Sub Form_Load()
conn.Open "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\ Account.mdb;persist security info = false"
End Sub

Continue reading...
 

Similar threads

R
Replies
0
Views
147
Ravi Kumar12233
R
C
Replies
0
Views
118
Claude du Québec
C
S
Replies
0
Views
127
Stuart Coutts (gtx_viper)
S
Back
Top