System math

Solo disponible en BuenasTareas
  • Páginas : 2 (374 palabras )
  • Descarga(s) : 0
  • Publicado : 23 de mayo de 2011
Leer documento completo
Vista previa del texto
System.Data
Imports System.Data.OleDb

Public Class Form1
Dim cmd As OleDbCommand 'Variables para ejecutar instrucciones sql
Dim adp As OleDbDataAdapter 'variable que contiene los datosrecuperados con la variable anterior
Dim rdr As OleDbDataReader 'variable que lee los datos sql
Dim tbl As New DataTable 'variable que recupera la tabla de la bdb
Dim sql As String'Variable que contiene la instruccion sql
Dim cn As OleDbConnection 'variable que contiene la conexion con la base de datos

Private Sub Label7_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Label7.Click

End Sub

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChangedEnd Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""TextBox3.Text = ""
TextBox4.Text = ""
TextBox6.Text = ""
DateTimePicker1.Value = Today
RadioButton1.Checked = False
RadioButton2.Checked = FalseComboBox1.SelectedIndex = -1
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cn = NewOleDbConnection("Provider=Microsoft.ace.oledb.12.0;Data source=E:\base\escolar.accdb;Persist Security info=False;")
cn.Open()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click
Dim encontro As Integer
Dim casado As Boolean
Dim municipio As Integer
encontro = 0
sql = "select * from Alumnos where cuenta='" &TextBox1.Text & "'" 'instrución sql que recupera la cuenta
cmd = New OleDbCommand(sql, cn) 'ejecuta la instrucion anterior sql
rdr = cmd.ExecuteReader 'almacena el resultado en la...
tracking img