en el boton guardar Dim con As New SqlClient.SqlConnection Dim strCon As String = "Data Source=PC-PC\SQLEXPRESS; Initial Catalog=COLMADOLOPEZ; User ID=sa; password=123456789;" Dim strCommand As String = "Insert into CLIENTES (CODCLI, NOMBREAPELLIDOS) values ('" & Me.TextBox1.Text & "', '" & Me.TextBox2.Text & "')" Try con.ConnectionString = strCon Dim cm As New SqlClient.SqlCommand(strCommand, con) con.Open() cm.ExecuteNonQuery() MsgBox("Guardado correctamente...") Limpiar() Catch ex As Exception MessageBox.Show(ex.Message, "Error") Finally If con.State = ConnectionState.Open Then con.Close() End If End Try ////////////////// crear este procedimiento Public Sub Limpiar() TextBox1.Clear() TextBox2.Clear() End Sub