{"id":24482232,"url":"https://github.com/ozzies-code/ejemplo-de-bases-de-datos","last_synced_at":"2025-09-03T00:41:57.997Z","repository":{"id":270746749,"uuid":"911332158","full_name":"ozzies-code/Ejemplo-de-Bases-de-Datos","owner":"ozzies-code","description":"Aplicacion de una base de datos en ACCESS 2016 que hace uso del CRUD para manipular registros en una base de datos","archived":false,"fork":false,"pushed_at":"2025-01-02T19:50:12.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T12:13:05.975Z","etag":null,"topics":["crud","dataadapter","database","datareader","datarow","datatable"],"latest_commit_sha":null,"homepage":"https://github.com/ozzies-code/Ejemplo-de-Bases-de-Datos","language":"Visual Basic .NET","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozzies-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T19:08:53.000Z","updated_at":"2025-01-02T20:07:27.000Z","dependencies_parsed_at":"2025-01-02T20:29:54.281Z","dependency_job_id":"5ce6c4b0-5a11-4dc8-b120-d4fc76efee34","html_url":"https://github.com/ozzies-code/Ejemplo-de-Bases-de-Datos","commit_stats":null,"previous_names":["ozzies-code/ejemplo-de-bases-de-datos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozzies-code%2FEjemplo-de-Bases-de-Datos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozzies-code%2FEjemplo-de-Bases-de-Datos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozzies-code%2FEjemplo-de-Bases-de-Datos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozzies-code%2FEjemplo-de-Bases-de-Datos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozzies-code","download_url":"https://codeload.github.com/ozzies-code/Ejemplo-de-Bases-de-Datos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243633011,"owners_count":20322518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crud","dataadapter","database","datareader","datarow","datatable"],"created_at":"2025-01-21T12:13:10.077Z","updated_at":"2025-03-14T19:22:43.163Z","avatar_url":"https://github.com/ozzies-code.png","language":"Visual Basic .NET","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ejemplo de Bases de Datos\n\n# Descripcion\n\n Este proyecto consiste en el desarrollo de una aplicacion que emplea\n el CRUD en una base de datos ACCESS 2016 para la manipulacion de los\n registros: Inserta, Consulta, Actualiza y Elimina registros de la \n base de datos de manera muy sencilla. se basa en el uso de objetos \n DataReader, DataSet, DataTable para generar una copia en memoria de \n la base de datos y esa copia va a ser rellenada con la informacion\n de las filas y las columnas de la base de datos empleando un objeto \n DataRow, es necesario emplear un espacio de nombres que permita \n ejecutar sentencias SQL que contendran la cadena de conexion e \n instrucciones que permitiran la manipulacion de los registros de la \n base de datos. \n \n # Actualizacion: 02/01/2025\n # Hora: 15:31\n\n# Database Example\n\n# Description\n\nThis project consists of the development of an application that uses\nCRUD in an ACCESS 2016 database for the manipulation of records: \nInsert, Query, Update and Delete records from the database in a very \nsimple way. It is based on the use of DataReader, DataSet, \nDataTable objects to generate a copy in memory of the database and \nthat copy will be filled with the information of the rows and columns \nof the database using a DataRow object. It is necessary to use a \nnamespace that allows the execution of SQL statements that will \ncontain the connection string and instructions that will allow \nthe manipulation of the records in the database.\n\n# Update: 02/01/2025\n# Time: 15:31\n\nTechnical Details of the Project:\nLanguage: Visual Basic.NET\nFramework Version: 4.7.2\n\n![imagen](https://github.com/user-attachments/assets/cdcfc92e-cfd9-4dd1-b516-76cb5960c834)\n\nCode of the Project:\n\n    Public Class FormPrincipal\n\n    Private m_cn As New OleDbConnection()\n    Private m_DA As OleDbDataAdapter\n    Private m_CB As OleDbCommandBuilder\n    Private m_DataTable As New DataTable\n    Private m_posFila As Integer = 0\n    Private Sub FormPrincipal_Load(sender As Object, e As EventArgs) Handles MyBase.Load\n\n        m_cn.ConnectionString = \"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\oswal\\Documents\\prueba.accdb\"\n\n        m_cn.Open()\n\n        m_DA = New OleDbDataAdapter(\"SELECT * FROM CLIENTES\", m_cn)\n\n        m_CB = New OleDbCommandBuilder(m_DA)\n\n        m_DA.Fill(m_DataTable)\n\n        Me.MostrarRegistroActual()\n\n    End Sub\n\n    Private Sub FormPrincipal_Closed(sender As Object, e As EventArgs) Handles Me.Closed\n        m_cn.Close()\n        m_cn.Dispose()\n    End Sub\n\n    Private Sub MostrarRegistroActual()\n\n        If m_DataTable.Rows.Count = 0 Then\n\n            txtNombres.Text = \"\"\n            txtNumId.Text = \"\"\n            txtIdCliente.Text = \"\"\n            txtTelefono.Text = \"\"\n            Exit Sub\n        End If\n\n        txtNombres.Text = m_DataTable.Rows(m_posFila)(\"NOMBRES\").ToString()\n        txtNumId.Text = m_DataTable.Rows(m_posFila)(\"NOIDENTIFICACION\").ToString()\n        txtIdCliente.Text = m_DataTable.Rows(m_posFila)(\"IDCLIENTE\").ToString()\n        txtTelefono.Text = m_DataTable.Rows(m_posFila)(\"TELEFONO\").ToString()\n\n    End Sub\n\n    Private Sub btnIrAPrimero_Click(sender As Object, e As EventArgs) Handles btnIrAPrimero.Click\n\n        'Ir al primer registro y mostrar los datos.\n        m_posFila = 0\n        Me.MostrarRegistroActual()\n    End Sub\n\n    Private Sub btnIrAAnterior_Click(sender As Object, e As EventArgs) Handles btnIrAAnterior.Click\n\n        'Si no estamos en el primer registro, ir al registro anterior.\n\n        If m_posFila \u003e 0 Then\n            m_posFila = m_posFila - 1\n            Me.MostrarRegistroActual()\n        End If\n    End Sub\n\n    Private Sub btnIrASiguiente_Click(sender As Object, e As EventArgs) Handles btnIrASiguiente.Click\n\n        'Si no estamos en el ultimo registro, ir al registro siguiente.\n\n        If m_posFila \u003c (m_DataTable.Rows.Count - 1) Then\n            m_posFila = m_posFila + 1\n            Me.MostrarRegistroActual()\n        End If\n\n    End Sub\n\n    Private Sub btnIrAUltimo_Click(sender As Object, e As EventArgs) Handles btnIrAUltimo.Click\n\n        'Si hay algun registro en la tabla,\n        'ir al ultimo registro y mostrarlo.\n\n        If m_DataTable.Rows.Count \u003e 0 Then\n\n            m_posFila = m_DataTable.Rows.Count - 1\n            Me.MostrarRegistroActual()\n        End If\n    End Sub\n\n    Private Sub btnGuardar_Click(sender As Object, e As EventArgs) Handles btnGuardar.Click\n\n        'Si hay datos, actualizarlos.\n        If m_DataTable.Rows.Count \u003c\u003e 0 Then\n\n            m_DataTable.Rows(m_posFila)(\"NOMBRES\") = txtNombres.Text\n            m_DataTable.Rows(m_posFila)(\"NOIDENTIFICACION\") = txtNumId.Text\n            m_DataTable.Rows(m_posFila)(\"IDCLIENTE\") = txtIdCliente.Text\n            m_DataTable.Rows(m_posFila)(\"TELEFONO\") = txtTelefono.Text\n            m_DA.Update(m_DataTable)\n\n            MsgBox(\"Registro Guardado\")\n        End If\n    End Sub\n\n    Private Sub btnNuevoRegistro_Click(sender As Object, e As EventArgs) Handles btnNuevoRegistro.Click\n\n\n        Dim drNuevaFila As DataRow = m_DataTable.NewRow\n\n        drNuevaFila(\"NOMBRES\") = txtNombreNuevoContacto.Text\n        drNuevaFila(\"NOIDENTIFICACION\") = txtNumIdNuevo.Text\n        drNuevaFila(\"IDCLIENTE\") = txtIdClienteNuevo.Text\n        drNuevaFila(\"TELEFONO\") = txtTelefonoNuevo.Text\n\n        m_DataTable.Rows.Add(drNuevaFila)\n        m_DA.Update(m_DataTable)\n        m_posFila = m_DataTable.Rows.Count - 1\n        Me.MostrarRegistroActual()\n\n\n    End Sub\n\n    Private Sub btnBorrar_Click(sender As Object, e As EventArgs) Handles btnBorrar.Click\n\n        'Si hay datos, borrar el registro actual.\n\n        If m_DataTable.Rows.Count \u003c\u003e 0 Then\n            m_DataTable.Rows(m_posFila).Delete()\n            m_DA.Update(m_DataTable)\n            m_posFila = 0\n            Me.MostrarRegistroActual()\n\n            MsgBox(\"Registro Eliminado\")\n        End If\n\n    End Sub\n\n    Private Sub btnLimpiar_Click(sender As Object, e As EventArgs) Handles btnLimpiar.Click\n\n        txtNombreNuevoContacto.Clear()\n        txtIdClienteNuevo.Clear()\n        txtNumIdNuevo.Clear()\n        txtTelefonoNuevo.Clear()\n    End Sub\nEnd Class\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozzies-code%2Fejemplo-de-bases-de-datos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozzies-code%2Fejemplo-de-bases-de-datos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozzies-code%2Fejemplo-de-bases-de-datos/lists"}