Hi
I am a new bee, I am trying to insert data into a database white the use of parameters. When I run this code I get an error message: "No value given for one or more required parameters."
Any help will be appreciated
conn.Open()
sql = "INSERT INTO Categories(Name) VALUES ( @PName)"
cm.Parameters.Clear()
cm.Parameters.Add("@PName", OleDb.OleDbType.LongVarChar).Value = Pname
cm = New OleDb.OleDbCommand(sql, conn)
cm.ExecuteNonQuery()
conn.Close()