Академический Документы
Профессиональный Документы
Культура Документы
2011
Profesor: Victor Eduardo Ríos Arrieta 12. En el cuadro de diálogo Guardar como, escriba Alumno en el cuadro
Materia: Elaborar sistemas de información mediante un lenguaje de de texto y luego haga clic en Aceptar. Cierre la vista Diseño.
programación visual (M3S3)
Grupos: 406 y 407 13. Haga clic con el botón secundario en la tabla Alumno y luego haga clic
en Abrir.
10. Haga clic con el botón secundario en SNo y luego en Clave principal.
De forma predeterminada, se crea Form1.
Abra una conexión a la base de datos de Access 5. En el panel Ver resultados del Asistente, haga clic en Finalizar.
6. Busque el archivo testdb.mdb de base de datos de Access que creó 'Fill retrieves rows from the data source by using the
siguiendo la ruta de acceso correspondiente en su equipo. SELECT statement OleDbDataAdapter1.Fill(DataSet11)
7. Seleccione el archivo testdb.mdb y luego haga clic en Abrir.
Siguiente:
Propiedades. Button2_Click:
Agregar.
4. Agregue el siguiente código al controlador de eventos Button1_Click: Dim i, rwno As Integer Dim colname As String Dim value As Object
colname = InputBox("Enter the name of the Column to be
updated") rwno = InputBox("Enter the Row Number to be updated:
Row No starts from 0") value = InputBox("Enter the value to be
Dim i, rwno As Integer Dim colname As String Dim value As Object
entered into the Student table") Try 'Update the column in the
colname = InputBox("Enter the name of the Column to be
Student table. DataSet11.Tables(0).Rows(rwno).Item(colname) =
updated") rwno = InputBox("Enter the Row Number to be updated:
value 'Update the Student table in the testdb database. i =
Row No starts from 0") value = InputBox("Enter the value to be
OleDbDataAdapter1.Update(DataSet11) Catch ex As Exception
entered into the Student table") Try 'Update the column in the
MessageBox.Show(ex.Message) End Try 'Displays number of rows
Student table. DataSet11.Tables(0).Rows(rwno).Item(colname) =
updated. MessageBox.Show("no of rows updated=" & i)
value 'Update the Student table in the testdb database. i =
OleDbDataAdapter1.Update(DataSet11) Catch ex As Exception
MessageBox.Show(ex.Message) End Try 'Displays number of rows
Borrar filas de una tabla en la base de datos de Access
updated. MessageBox.Show("no of rows updated=" & i)
Text en Actualizar. Dim i As Integer Dim rno As Integer rno = InputBox("Enter the Row
no to be deleted: Row no starts from 0") Try 'Delete a row from the
Student table. DataSet11.Tables(0).Rows(rno).Delete() 'Update the
Student table in the testdb database. i =
OleDbDataAdapter1.Update(DataSet11) Catch ex As Exception
MsgBox(ex.Message) End Try 'Displays number of rows updated.
MessageBox.Show("no of rows updated=" & i)
Nota
Alumno.
tabla Alumno.