SlideShare une entreprise Scribd logo
1  sur  2
INSERCION DE DATOS A UNA TABLA<br />VISUAL BASIC.NET<br />CREATE DATABASE EJERCICIO<br />USE EJERCICIO<br />CREATE TABLE PRUEBA<br />(CODIGO VARCHAR (5), <br />NOMBRE NVARCHAR (25), <br />APELLIDO NVARCHAR(25),<br />DIRECCION NVARCHAR(25), <br />TELEFONO FLOAT(53))<br />SELECT * FROM PRUEBA<br />CREAR UN MODULO<br />Imports System.Data.sqlclient<br />Module CONEXION<br />    Public cn As New SqlConnection(quot;
server = (local); database = ejercicio; user id = sa; password=123quot;
)<br />End Module<br />Imports System.Data.sqlclient<br />Public Class Form1<br />    Dim da As SqlDataAdapter<br />    Dim ds As DataSet<br />    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />    End Sub<br />    Private Sub btngrabar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngrabar.Click<br />        Dim sql As String = quot;
insert into PRUEBA values(@codigo, @nombre,@apellido, @direccion, @telefono)quot;
<br />        Dim cmd As New SqlCommand(sql, cn)<br />        Try<br />            cmd.CommandType = CommandType.Text<br />            cmd.Parameters.Add(quot;
@codigoquot;
, SqlDbType.VarChar, 5).Value = Me.txtcodigo.Text<br />            cmd.Parameters.Add(quot;
@nombrequot;
, SqlDbType.NVarChar, 25).Value = Me.txtnombres.Text<br />            cmd.Parameters.Add(quot;
@apellidoquot;
, SqlDbType.NVarChar, 25).Value = Me.txtapellidos.Text<br />            cmd.Parameters.Add(quot;
@direccionquot;
, SqlDbType.NVarChar, 20).Value = Me.txtdirecion.Text<br />            cmd.Parameters.Add(quot;
@telefonoquot;
, SqlDbType.Float, 53).Value = Me.txttelefono.Text<br />            CN.Open()<br />            cmd.ExecuteNonQuery()<br />            MessageBox.Show(quot;
REGISTRO INSERTADO CORRECTAMENTEquot;
)<br />        Catch ex As Exception<br />        End Try<br />    End Sub<br />    Private Sub btnnuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnuevo.Click<br />        Me.txtcodigo.Text = quot;
quot;
<br />        Me.txtnombres.Text = quot;
quot;
<br />        Me.txtapellidos.Text = quot;
quot;
<br />        Me.txtdirecion.Text = quot;
quot;
<br />        Me.txttelefono.Text = quot;
quot;
<br />    End Sub<br />End Class<br />
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER

Contenu connexe

Tendances

SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands1keydata
 
Estructura de archivos secuencial indexado
Estructura de archivos secuencial indexadoEstructura de archivos secuencial indexado
Estructura de archivos secuencial indexadodexter120
 
All About PL/SQL Collections
All About PL/SQL CollectionsAll About PL/SQL Collections
All About PL/SQL CollectionsSteven Feuerstein
 
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱PgDay.Seoul
 
Introduccion a las bases de datos
Introduccion a las bases de datosIntroduccion a las bases de datos
Introduccion a las bases de datosCristian Salazar C.
 
ClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, CloudflareClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, CloudflareAltinity Ltd
 
Comandos ddl y dml
Comandos ddl y dmlComandos ddl y dml
Comandos ddl y dmlGerardo
 
Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)overcertified
 
Proyecto Final Base De Datos
Proyecto Final Base De DatosProyecto Final Base De Datos
Proyecto Final Base De Datosguestcde16b
 
Comandos utilizados en sql
Comandos utilizados en sqlComandos utilizados en sql
Comandos utilizados en sqlByron Eras
 
Modos de Direccionamiento
Modos de DireccionamientoModos de Direccionamiento
Modos de Direccionamientogbermeo
 
Tipos de datos oracle
Tipos de datos oracleTipos de datos oracle
Tipos de datos oracleAngel Livestn
 
What is SQL? | Edureka
What is SQL? | EdurekaWhat is SQL? | Edureka
What is SQL? | EdurekaEdureka!
 

Tendances (20)

SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
Estructura de archivos secuencial indexado
Estructura de archivos secuencial indexadoEstructura de archivos secuencial indexado
Estructura de archivos secuencial indexado
 
E3 ejercicio empresa
E3 ejercicio empresaE3 ejercicio empresa
E3 ejercicio empresa
 
Sql triggers
Sql triggersSql triggers
Sql triggers
 
All About PL/SQL Collections
All About PL/SQL CollectionsAll About PL/SQL Collections
All About PL/SQL Collections
 
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
 
Introduccion a las bases de datos
Introduccion a las bases de datosIntroduccion a las bases de datos
Introduccion a las bases de datos
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
ClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, CloudflareClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
 
Comandos ddl y dml
Comandos ddl y dmlComandos ddl y dml
Comandos ddl y dml
 
Login C sharp
Login C sharpLogin C sharp
Login C sharp
 
Redo log
Redo logRedo log
Redo log
 
Good sql server interview_questions
Good sql server interview_questionsGood sql server interview_questions
Good sql server interview_questions
 
Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)Demystifying the Microsoft Extended FAT File System (exFAT)
Demystifying the Microsoft Extended FAT File System (exFAT)
 
Proyecto Final Base De Datos
Proyecto Final Base De DatosProyecto Final Base De Datos
Proyecto Final Base De Datos
 
Comandos utilizados en sql
Comandos utilizados en sqlComandos utilizados en sql
Comandos utilizados en sql
 
Modos de Direccionamiento
Modos de DireccionamientoModos de Direccionamiento
Modos de Direccionamiento
 
Tipos de datos oracle
Tipos de datos oracleTipos de datos oracle
Tipos de datos oracle
 
Stored procedures
Stored proceduresStored procedures
Stored procedures
 
What is SQL? | Edureka
What is SQL? | EdurekaWhat is SQL? | Edureka
What is SQL? | Edureka
 

En vedette

Ejemplo GUARDAR registros desde Visual Basic 2012
Ejemplo GUARDAR registros desde Visual Basic 2012Ejemplo GUARDAR registros desde Visual Basic 2012
Ejemplo GUARDAR registros desde Visual Basic 2012Vane Borjas
 
Ejemplo ACTUALIZAR registros desde Visual Basic 2012
Ejemplo ACTUALIZAR registros desde Visual Basic 2012Ejemplo ACTUALIZAR registros desde Visual Basic 2012
Ejemplo ACTUALIZAR registros desde Visual Basic 2012Vane Borjas
 
CONEXION VISUAL STUDIO.NET - SQL SERVER
CONEXION VISUAL STUDIO.NET - SQL SERVERCONEXION VISUAL STUDIO.NET - SQL SERVER
CONEXION VISUAL STUDIO.NET - SQL SERVERDarwin Durand
 
Pasos Para Conectar Una Base De Datos En Visual Basic
Pasos Para Conectar Una Base De Datos En Visual BasicPasos Para Conectar Una Base De Datos En Visual Basic
Pasos Para Conectar Una Base De Datos En Visual Basicguest6a4bfb
 
Pasos Para Crear un Formulario Con Base de Datos En Visual Basic
Pasos Para Crear un Formulario Con Base de Datos En Visual BasicPasos Para Crear un Formulario Con Base de Datos En Visual Basic
Pasos Para Crear un Formulario Con Base de Datos En Visual BasicMaybel_Lopez
 
Ejemplo ELIMINAR registros desde Visual Basic 2012
Ejemplo ELIMINAR registros desde Visual Basic 2012Ejemplo ELIMINAR registros desde Visual Basic 2012
Ejemplo ELIMINAR registros desde Visual Basic 2012Vane Borjas
 
Ejemplo BUSCAR registros desde Visual Basic 2012
Ejemplo BUSCAR registros desde Visual Basic 2012Ejemplo BUSCAR registros desde Visual Basic 2012
Ejemplo BUSCAR registros desde Visual Basic 2012Vane Borjas
 
Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!Ziscko
 
Conectar sql-c-sharp- muy bueno
Conectar sql-c-sharp- muy buenoConectar sql-c-sharp- muy bueno
Conectar sql-c-sharp- muy buenoAdrian Garcia
 
Ejemplo LOGIN conectado a una base de datos
Ejemplo LOGIN conectado a una base de datosEjemplo LOGIN conectado a una base de datos
Ejemplo LOGIN conectado a una base de datosVane Borjas
 
Como crear una base de datos con visual basic
Como crear una base de datos con visual basicComo crear una base de datos con visual basic
Como crear una base de datos con visual basicAlberto Vargas
 
Proyectos de Base de Datos con Visual Studio 2013
Proyectos de Base de Datos con Visual Studio 2013Proyectos de Base de Datos con Visual Studio 2013
Proyectos de Base de Datos con Visual Studio 2013Rodolfo Finochietti
 
Curso de sistemas información c sharp itlm
Curso de sistemas información   c sharp itlmCurso de sistemas información   c sharp itlm
Curso de sistemas información c sharp itlmjlngaribaldi
 
Acceso visual.net con data mysql y sql server 2000
Acceso visual.net con data mysql y sql server 2000Acceso visual.net con data mysql y sql server 2000
Acceso visual.net con data mysql y sql server 2000jdavilac1959
 
Base de datos acces 2010 hecha en casa hbsdugb
Base de datos acces 2010 hecha en casa hbsdugbBase de datos acces 2010 hecha en casa hbsdugb
Base de datos acces 2010 hecha en casa hbsdugbFelipe Pesca
 
APLICACIONES EMPRESARIALES
APLICACIONES EMPRESARIALESAPLICACIONES EMPRESARIALES
APLICACIONES EMPRESARIALESDarwin Durand
 
pasos para conectar base de datos con vb
pasos para conectar base de datos con vbpasos para conectar base de datos con vb
pasos para conectar base de datos con vbguest459a39a
 
Habilitacion de Autentificaion de sql
Habilitacion de Autentificaion de sql Habilitacion de Autentificaion de sql
Habilitacion de Autentificaion de sql KevinFD
 

En vedette (20)

Ejemplo GUARDAR registros desde Visual Basic 2012
Ejemplo GUARDAR registros desde Visual Basic 2012Ejemplo GUARDAR registros desde Visual Basic 2012
Ejemplo GUARDAR registros desde Visual Basic 2012
 
Ejemplo ACTUALIZAR registros desde Visual Basic 2012
Ejemplo ACTUALIZAR registros desde Visual Basic 2012Ejemplo ACTUALIZAR registros desde Visual Basic 2012
Ejemplo ACTUALIZAR registros desde Visual Basic 2012
 
CONEXION VISUAL STUDIO.NET - SQL SERVER
CONEXION VISUAL STUDIO.NET - SQL SERVERCONEXION VISUAL STUDIO.NET - SQL SERVER
CONEXION VISUAL STUDIO.NET - SQL SERVER
 
Pasos Para Conectar Una Base De Datos En Visual Basic
Pasos Para Conectar Una Base De Datos En Visual BasicPasos Para Conectar Una Base De Datos En Visual Basic
Pasos Para Conectar Una Base De Datos En Visual Basic
 
Pasos Para Crear un Formulario Con Base de Datos En Visual Basic
Pasos Para Crear un Formulario Con Base de Datos En Visual BasicPasos Para Crear un Formulario Con Base de Datos En Visual Basic
Pasos Para Crear un Formulario Con Base de Datos En Visual Basic
 
Visual y sql
Visual y sqlVisual y sql
Visual y sql
 
Ejemplo ELIMINAR registros desde Visual Basic 2012
Ejemplo ELIMINAR registros desde Visual Basic 2012Ejemplo ELIMINAR registros desde Visual Basic 2012
Ejemplo ELIMINAR registros desde Visual Basic 2012
 
Ejemplo BUSCAR registros desde Visual Basic 2012
Ejemplo BUSCAR registros desde Visual Basic 2012Ejemplo BUSCAR registros desde Visual Basic 2012
Ejemplo BUSCAR registros desde Visual Basic 2012
 
Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!
 
Conectar sql-c-sharp- muy bueno
Conectar sql-c-sharp- muy buenoConectar sql-c-sharp- muy bueno
Conectar sql-c-sharp- muy bueno
 
Ejemplo LOGIN conectado a una base de datos
Ejemplo LOGIN conectado a una base de datosEjemplo LOGIN conectado a una base de datos
Ejemplo LOGIN conectado a una base de datos
 
Como crear una base de datos con visual basic
Como crear una base de datos con visual basicComo crear una base de datos con visual basic
Como crear una base de datos con visual basic
 
Proyectos de Base de Datos con Visual Studio 2013
Proyectos de Base de Datos con Visual Studio 2013Proyectos de Base de Datos con Visual Studio 2013
Proyectos de Base de Datos con Visual Studio 2013
 
Curso de sistemas información c sharp itlm
Curso de sistemas información   c sharp itlmCurso de sistemas información   c sharp itlm
Curso de sistemas información c sharp itlm
 
Acceso visual.net con data mysql y sql server 2000
Acceso visual.net con data mysql y sql server 2000Acceso visual.net con data mysql y sql server 2000
Acceso visual.net con data mysql y sql server 2000
 
Base de datos acces 2010 hecha en casa hbsdugb
Base de datos acces 2010 hecha en casa hbsdugbBase de datos acces 2010 hecha en casa hbsdugb
Base de datos acces 2010 hecha en casa hbsdugb
 
APLICACIONES EMPRESARIALES
APLICACIONES EMPRESARIALESAPLICACIONES EMPRESARIALES
APLICACIONES EMPRESARIALES
 
pasos para conectar base de datos con vb
pasos para conectar base de datos con vbpasos para conectar base de datos con vb
pasos para conectar base de datos con vb
 
6. windows forms
6.  windows forms6.  windows forms
6. windows forms
 
Habilitacion de Autentificaion de sql
Habilitacion de Autentificaion de sql Habilitacion de Autentificaion de sql
Habilitacion de Autentificaion de sql
 

Similaire à INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER

SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)Darwin Durand
 
Aplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnetAplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnetDiaz Alfahrezy
 
Michael Colon Portfolio
Michael Colon PortfolioMichael Colon Portfolio
Michael Colon Portfoliomichael_colon
 
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84Mahmoud Samir Fayed
 
Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01mafv1976
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventasDAYANA RETO
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31Mahmoud Samir Fayed
 
Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012Sandeep Joshi
 
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184Mahmoud Samir Fayed
 
Codes
CodesCodes
CodesOSit3
 
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189Mahmoud Samir Fayed
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docxAustinaGRPaigey
 
The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181Mahmoud Samir Fayed
 
You are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdfYou are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdfJUSTSTYLISH3B2MOHALI
 

Similaire à INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER (20)

SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)
 
Aplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnetAplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnet
 
Michael Colon Portfolio
Michael Colon PortfolioMichael Colon Portfolio
Michael Colon Portfolio
 
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventas
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31
 
Uni2
Uni2Uni2
Uni2
 
Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012
 
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184
 
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
 
Codes
CodesCodes
Codes
 
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 
The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
 
You are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdfYou are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdf
 

Plus de Darwin Durand

Ejemplos Borland C++ Builder
Ejemplos Borland C++ BuilderEjemplos Borland C++ Builder
Ejemplos Borland C++ BuilderDarwin Durand
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEDarwin Durand
 
EJEMPLOS DESARROLLADOS
EJEMPLOS DESARROLLADOSEJEMPLOS DESARROLLADOS
EJEMPLOS DESARROLLADOSDarwin Durand
 
PERSISTENCIA BASADA EN ARCHIVOS
PERSISTENCIA BASADA EN ARCHIVOSPERSISTENCIA BASADA EN ARCHIVOS
PERSISTENCIA BASADA EN ARCHIVOSDarwin Durand
 
PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)
PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)
PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)Darwin Durand
 
CREACION DE DLL Y USO (Ejemplo desarrollado)
CREACION DE DLL Y USO (Ejemplo desarrollado)CREACION DE DLL Y USO (Ejemplo desarrollado)
CREACION DE DLL Y USO (Ejemplo desarrollado)Darwin Durand
 
CURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOL
CURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOLCURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOL
CURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOLDarwin Durand
 
INDICES EN SQL SERVER
INDICES EN SQL SERVERINDICES EN SQL SERVER
INDICES EN SQL SERVERDarwin Durand
 
CREACION Y MANEJO DE LA BASE DE DATOS
CREACION Y MANEJO DE LA BASE DE DATOSCREACION Y MANEJO DE LA BASE DE DATOS
CREACION Y MANEJO DE LA BASE DE DATOSDarwin Durand
 

Plus de Darwin Durand (12)

Ejemplos Borland C++ Builder
Ejemplos Borland C++ BuilderEjemplos Borland C++ Builder
Ejemplos Borland C++ Builder
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
 
EJEMPLOS DESARROLLADOS
EJEMPLOS DESARROLLADOSEJEMPLOS DESARROLLADOS
EJEMPLOS DESARROLLADOS
 
PERSISTENCIA BASADA EN ARCHIVOS
PERSISTENCIA BASADA EN ARCHIVOSPERSISTENCIA BASADA EN ARCHIVOS
PERSISTENCIA BASADA EN ARCHIVOS
 
PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)
PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)
PROYECTO PRUEBA DE CONEXIONES (Mantenimiento)
 
CREACION DE DLL Y USO (Ejemplo desarrollado)
CREACION DE DLL Y USO (Ejemplo desarrollado)CREACION DE DLL Y USO (Ejemplo desarrollado)
CREACION DE DLL Y USO (Ejemplo desarrollado)
 
CURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOL
CURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOLCURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOL
CURSO DE PROGRAMACION AVANZADA EN JAVA EN ESPAÑOL
 
SERVLET BASICS
SERVLET BASICSSERVLET BASICS
SERVLET BASICS
 
INDICES EN SQL SERVER
INDICES EN SQL SERVERINDICES EN SQL SERVER
INDICES EN SQL SERVER
 
INTEGRIDAD DE DATOS
INTEGRIDAD DE DATOSINTEGRIDAD DE DATOS
INTEGRIDAD DE DATOS
 
CREACION Y MANEJO DE LA BASE DE DATOS
CREACION Y MANEJO DE LA BASE DE DATOSCREACION Y MANEJO DE LA BASE DE DATOS
CREACION Y MANEJO DE LA BASE DE DATOS
 
CREACION DE TABLAS
CREACION DE TABLASCREACION DE TABLAS
CREACION DE TABLAS
 

Dernier

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 

Dernier (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 

INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER

  • 1. INSERCION DE DATOS A UNA TABLA<br />VISUAL BASIC.NET<br />CREATE DATABASE EJERCICIO<br />USE EJERCICIO<br />CREATE TABLE PRUEBA<br />(CODIGO VARCHAR (5), <br />NOMBRE NVARCHAR (25), <br />APELLIDO NVARCHAR(25),<br />DIRECCION NVARCHAR(25), <br />TELEFONO FLOAT(53))<br />SELECT * FROM PRUEBA<br />CREAR UN MODULO<br />Imports System.Data.sqlclient<br />Module CONEXION<br /> Public cn As New SqlConnection(quot; server = (local); database = ejercicio; user id = sa; password=123quot; )<br />End Module<br />Imports System.Data.sqlclient<br />Public Class Form1<br /> Dim da As SqlDataAdapter<br /> Dim ds As DataSet<br /> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br /> End Sub<br /> Private Sub btngrabar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngrabar.Click<br /> Dim sql As String = quot; insert into PRUEBA values(@codigo, @nombre,@apellido, @direccion, @telefono)quot; <br /> Dim cmd As New SqlCommand(sql, cn)<br /> Try<br /> cmd.CommandType = CommandType.Text<br /> cmd.Parameters.Add(quot; @codigoquot; , SqlDbType.VarChar, 5).Value = Me.txtcodigo.Text<br /> cmd.Parameters.Add(quot; @nombrequot; , SqlDbType.NVarChar, 25).Value = Me.txtnombres.Text<br /> cmd.Parameters.Add(quot; @apellidoquot; , SqlDbType.NVarChar, 25).Value = Me.txtapellidos.Text<br /> cmd.Parameters.Add(quot; @direccionquot; , SqlDbType.NVarChar, 20).Value = Me.txtdirecion.Text<br /> cmd.Parameters.Add(quot; @telefonoquot; , SqlDbType.Float, 53).Value = Me.txttelefono.Text<br /> CN.Open()<br /> cmd.ExecuteNonQuery()<br /> MessageBox.Show(quot; REGISTRO INSERTADO CORRECTAMENTEquot; )<br /> Catch ex As Exception<br /> End Try<br /> End Sub<br /> Private Sub btnnuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnuevo.Click<br /> Me.txtcodigo.Text = quot; quot; <br /> Me.txtnombres.Text = quot; quot; <br /> Me.txtapellidos.Text = quot; quot; <br /> Me.txtdirecion.Text = quot; quot; <br /> Me.txttelefono.Text = quot; quot; <br /> End Sub<br />End Class<br />