error message: No value given for one or more required parameters.
that falls in dr = cmd.ExecuteReader
need help
Imports System.Data.OleDb
Public Class Form1
Dim conn As OleDbConnection
Dim cmd As OleDbCommand
Dim strSQL As String
Dim dr As OleDbDataReader
' Dim ctr As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Database1.mdb")
conn.Open()
End Sub
Private Sub enter1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles accept1.Click
strSQL = "SELECT * ATM WHERE pincode = '" & pinenter.Text & "'"
cmd = New OleDbCommand(strSQL, conn)
dr = cmd.ExecuteReader
'strSQL = " SELECT * FROM ATM WHERE pincode =" & "'" & pinenter.Text & "'"
'cmd = New OleDbCommand(strSQL, conn)
'dr = cmd.ExecuteReader
ctr = ctr + 1
If dr.HasRows Then
'While dr.Read
Form4.balance.Visible = dr("Balance_Inquiry")
Me.Hide()
Form3.Show()
If ctr = 3 Then
Me.Hide()
Form9.Show()
Form9.Timer1.Enabled = True
End If
Else
MsgBox("WRONG PIN !")
pinenter.Text = ""
End If