1.- is there a way to avoid typing all that each time I want to acces the database (example each button), and if so how.
Ans: Declare the con, comando in the General Declarations section.
Set the Connection string and command text (con) in the Form_Load event instead of each button.
General Declarations:
Dim con As
System.Data.OleDb.OleDbConnection
Dim comando As System.Data.OleDb.OleDbCommand
Dim adaptador As System.Data.OleDb.OleDbDataReader
Form_Load:
conexion = "provider = microsoft.jet.oledb.4.0;data source= C:\Download\Anime.mdb"
consulta = "select Nombre, Tipo, Discos, Completa from CD where Nombre like '" + TextBox2.Text + "'
con= New
System.Data.OleDb.OleDbConnection (connexion)
comando= New System.Data.OleDb.OleDbCommand (consulta,con)
The rest of the code goes in the button for retrieving data.
2.- is there a better way to manipulate the database.
Ans: You can use a DataAdaptor and DataSet
3. Need more Explanation