BOTON SIGUIENTE EN FORMULARIO ASP.NET
Publicado por CARLOS VELAZCO (6 intervenciones) el 15/04/2009 04:46:10
HOLA ESPERO ME PUEDAN AYUDAR TENGO UN FORMULARIO DE MANTENIMIENTO EN AS.NET EL CUAL GUARDO LOS DATOS EN SQL SERVER
MI PROBLEMA ES EL SIGUIENTE...ES SOLO EN UNALINEA NO SE COMO COMPARARLO
Dim cn As New SqlConnection
cn.ConnectionString = "Server=.;database=UNIVERSIDAD;integrated security=SSPI"
cn.Open()
'Dim busca As String
'busca = InputBox("Ingrese codigo a buscar")
Dim da As New SqlDataAdapter("Select * from ALUMNO", cn)
Dim ds As New Data.DataSet
da.Fill(ds, "alumno")
'
'If ds.Tables("alumno").Rows.Count > 0 Then
'Dim filas As Data.DataRow = ds.Tables("alumno").Rows(Integer.Parse(TextBox1.Text))
Dim d = ds.Tables("alumno").Rows(Integer.Parse(TextBox1.Text))
TextBox1.Text = ds.Tables("alumno").Rows(0)("CODIGO")
TextBox3.Text = ds.Tables("alumno").Rows(0)("NOMBRE")
TextBox4.Text = ds.Tables("alumno").Rows(0)("direccion")
TextBox5.Text = ds.Tables("alumno").Rows(0)("telefonof")
TextBox10.Text = ds.Tables("alumno").Rows(0)("telefonom")
'TextBox1.Text = filas(0)
'TextBox3.Text = filas(1)
'TextBox4.Text = filas(2)
'TextBox5.Text = filas(3)
'TextBox10.Text = filas(4)
'cn.Close()
MI PROBLEMA ESTA EN ESTA LINEA DE CODIGO
'Dim filas As Data.DataRow = ds.Tables("alumno").Rows(Integer.Parse(TextBox1.Text))
COMO HAGO PARA COMPARAR ESTO ME SALE EL SIGUIENTE ERROR
"La cadena de entrada no tiene el formato correcto." espero me puedan ayudar
gracias
MI PROBLEMA ES EL SIGUIENTE...ES SOLO EN UNALINEA NO SE COMO COMPARARLO
Dim cn As New SqlConnection
cn.ConnectionString = "Server=.;database=UNIVERSIDAD;integrated security=SSPI"
cn.Open()
'Dim busca As String
'busca = InputBox("Ingrese codigo a buscar")
Dim da As New SqlDataAdapter("Select * from ALUMNO", cn)
Dim ds As New Data.DataSet
da.Fill(ds, "alumno")
'
'If ds.Tables("alumno").Rows.Count > 0 Then
'Dim filas As Data.DataRow = ds.Tables("alumno").Rows(Integer.Parse(TextBox1.Text))
Dim d = ds.Tables("alumno").Rows(Integer.Parse(TextBox1.Text))
TextBox1.Text = ds.Tables("alumno").Rows(0)("CODIGO")
TextBox3.Text = ds.Tables("alumno").Rows(0)("NOMBRE")
TextBox4.Text = ds.Tables("alumno").Rows(0)("direccion")
TextBox5.Text = ds.Tables("alumno").Rows(0)("telefonof")
TextBox10.Text = ds.Tables("alumno").Rows(0)("telefonom")
'TextBox1.Text = filas(0)
'TextBox3.Text = filas(1)
'TextBox4.Text = filas(2)
'TextBox5.Text = filas(3)
'TextBox10.Text = filas(4)
'cn.Close()
MI PROBLEMA ESTA EN ESTA LINEA DE CODIGO
'Dim filas As Data.DataRow = ds.Tables("alumno").Rows(Integer.Parse(TextBox1.Text))
COMO HAGO PARA COMPARAR ESTO ME SALE EL SIGUIENTE ERROR
"La cadena de entrada no tiene el formato correcto." espero me puedan ayudar
gracias
Valora esta pregunta


0