when ever run my program i get the below exception.
Exception thrown: 'System.Data.OleDb.OleDbException' in System.Data.dll
at
System.Data.OleDb.OleDbCommand.Execute.ExecuteCommandTextErrorHandling(OleDbHResulthr)
at
System.Data.OleDb.OleDbCommand.Execute.ExecuteCommandTextForSingleResult(tagDBPARAMSdbParams,Object&executeResult)
at
System.Data.OleDb.OleDbCommand.Execute.ExecuteReade(Command Behavior beehavior,String method)
at
System.Data.OleDb.OleDbCommand.ExecuteReadder(CommandBehavior behavior)
at
line 60
and line 60 = rdr = cmd.ExecuteReader()
I'm using below code:
con = New OleDbConnection(cs)
con.Open()
Dim ct As String = "select Allowances,BasicSalary,CashBenefits,VehicleFuelDriver,VehicleFuel,vehicleOnly,FuelOnly,AccomodationFurnishing,AccomodationOnly,SharedAccomodation,AgeDependency,MarriageResponsibilities,Disabled,OldAge,ChildEducation,TrainingCost,Tier3contribution,NoChildren,LifeInsurance,SSN,NoOfDependents from EmployeeRegistration where EmployeeName=@find"
cmd = New OleDbCommand(ct)
cmd.Connection = con
cmd.Parameters.Add(New OleDbParameter("@find", OleDbType.VarChar, 30, "EmployeeName"))
cmd.Parameters("@find").Value = Trim(employeenamecmbbx.Text)
rdr = cmd.ExecuteReader()