ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Aplicaciones Asp


Enviado por   •  23 de Noviembre de 2014  •  425 Palabras (2 Páginas)  •  118 Visitas

Página 1 de 2

RESULTADO NAVEGADOR

Los Registros Llenados en la BASE DE DATOS se muestran a continuacion:

EL Codigo para la siquiente aplicacion es la siguiente:

Imports System.Data.SqlClient

Partial Public Class _Default

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim conexion As String

conexion = "Data Source=PC-01\SQLSERVER2012;Initial Catalog=xxx;Integrated Security=True"

Dim objconexion As New SqlConnection(conexion)

Dim strSQL1, strSQL2, strSQL3, strSQL4 As String

strSQL1 = "Select Cod_Em,Nom_Em,Ape_Em,Area_Em,Cargo_Em from Empleados where Area_Em in(10,20,30,40)"

strSQL2 = "Select Cod_Em,Nom_Em,Sueldo_Em from Empleados where Sueldo_Em>530 and Sueldo_Em<2000"

strSQL3 = "Select * from Empleados where Fecha_Ing>='01/01/2000'"

strSQL4 = "Select Nom_Em,Ape_Em,Area_Em,Sueldo_Em from Empleados where Ape_Em like'W%'"

Dim objcommand1 As New SqlCommand(strSQL1, objconexion)

Dim objcommand2 As New SqlCommand(strSQL2, objconexion)

Dim objcommand3 As New SqlCommand(strSQL3, objconexion)

Dim objcommand4 As New SqlCommand(strSQL4, objconexion)

Dim objadapter1, objadapter2, objadapter3, objadapter4 As New SqlDataAdapter

objadapter1.SelectCommand = objcommand1

objadapter2.SelectCommand = objcommand2

objadapter3.SelectCommand = objcommand3

objadapter4.SelectCommand = objcommand4

objconexion.Open()

Dim objds1, objds2, objds3, objds4 As New DataSet

...

Descargar como (para miembros actualizados)  txt (2.2 Kb)  
Leer 1 página más »
Disponible sólo en Clubensayos.com