Dim objConnection As OleDbConnection
Dim Dir As String = Director.Text
objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\dvdrental.mdb;Persist Security Info=False")
objConnection.Open()
Dim Command As OleDbCommand
Command = New OleDbCommand("Select * from MovieCont where Director = (" & Dir & ")", objConnection)
Command.ExecuteNonQuery()
directresults.Text = Command.ExecuteNonQuery
The result i get is
No value given for one or more required parameters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters