Tema: Formulario
Ver Mensaje Individual
  #7 (permalink)  
Antiguo 22/03/2005, 08:23
Avatar de Sayra
Sayra
 
Fecha de Ingreso: diciembre-2004
Mensajes: 365
Antigüedad: 20 años, 2 meses
Puntos: 1
Hola gracias a todos por las respuestas, pero tengo una duda con la consulta

yo pense y asi lo hice, pero que va la cosa no me funciono hacer asi la consulta

pero pongo el codigo para que me digan cuan equivocada estoy

Sub Page_Load(Sender As Object, E As EventArgs)
Dim DS As DataSet
Dim MyCommand As SqlCommand

Dim SelectCmd As String = "Select (Cargo_Solicitado, Apellidos_Nombres, Nacionalidad, Cedula_Identidad, Fecha_Nacimiento, Estado_Civil, Edad, Profesion, Sexo, Telefono_Cel, Telefono_Hab, Correo_Electronico, Direccion_Permanente, Tecnico_Instituto, Tecnico_Graduado, Tecnico_Ano_Graduacion, Tecnico_Titulo, Universitario_Instituto, Universitario_Graduado, Universitario_Ano_Graduacion, Universitario_Titulo, PostGrado_Instituto, PostGrado_Graduado, PostGrado_Ano_Graduacion, PostGrado_Titulo, Empleado_Actualmente, Empresa, Cargo, Desde, Hasta) values (@Cargo_Solicitado, @Apellidos_Nombres, @Nacionalidad, @Cedula_Identidad, @Fecha_Nacimiento, @Estado_Civil, @Edad ,@Profesion, @Sexo, @Telefono_Cel, @Telefono_Hab, @Correo_Electronico, @Direccion_Permanente, @Tecnico_Instituto, @Tecnico_Graduado, @Tecnico_Ano_Graduacion, @Tecnico_Titulo, @Universitario_Instituto, @Universitario_Graduado, @Universitario_Ano_Graduacion, @Universitario_Titulo, @PostGrado_Instituto, @PostGrado_Graduado, @PostGrado_Ano_Graduacion, @PostGrado_Titulo, @Empleado_Actualmente, @Empresa, @Cargo, @Desde, @Hasta) from SolicitudEmpleo where SolicitudID=@SolicitudID"

MyCommand = New SqlCommand(SelectCmd, PortalSettings.SqlConnectionString)

MyCommand.Parameters.Get(New SqlParameter("@Cargo_Solicitado", SqlDbType.Char, 100))
MyCommand.Parameters("@Cargo_Solicitado").Value = TextBox5.Text

MyCommand.Parameters.Get(New SqlParameter("@Apellidos_Nombres", SqlDbType.Char, 40))
MyCommand.Parameters("@Apellidos_Nombres").Value = TextBox1.Text

MyCommand.Parameters.Get(New SqlParameter("@Nacionalidad", SqlDbType.Decimal, 9))
MyCommand.Parameters("@Nacionalidad").Value =TextBox11.Text

MyCommand.Parameters.Get(New SqlParameter("@Cedula_Identidad", SqlDbType.Decimal, 9))
MyCommand.Parameters("@Cedula_Identidad").Value =TextBox2.Text

MyCommand.Parameters.Get(New SqlParameter("@Fecha_Nacimiento", SqlDbType.Char, 8))
MyCommand.Parameters("@Fecha_Nacimiento").Value = TextBox3.Text

MyCommand.Parameters.Get(New SqlParameter("@Estado_Civil", SqlDbType.Char, 12))
MyCommand.Parameters("@Estado_Civil").Value = TextBox12.Text

MyCommand.Parameters.Get(New SqlParameter("@Edad", SqlDbType.Decimal, 9))
MyCommand.Parameters("@Edad").Value = TextBox4.Text

MyCommand.Parameters.Get(New SqlParameter("@Profesion", SqlDbType.Char, 30))
MyCommand.Parameters("@Profesion").Value = TextBox15.Text

MyCommand.Parameters.Get(New SqlParameter("@Sexo", SqlDbType.Char, 20))
MyCommand.Parameters("@Sexo").Value = TextBox14.Text

MyCommand.Parameters.Get(New SqlParameter("@Telefono_Cel", SqlDbType.NChar, 20))
MyCommand.Parameters("@Telefono_Cel").Value =TextBox6.Text & TextBox7.Text

MyCommand.Parameters.Get(New SqlParameter("@Telefono_Hab", SqlDbType.NChar, 20))
MyCommand.Parameters("@Telefono_Hab").Value =TextBox8.Text & TextBox8.Text

MyCommand.Parameters.Get(New SqlParameter("@Correo_Electronico", SqlDbType.Char, 50))
MyCommand.Parameters("@Correo_Electronico").Value = TextBox10.Text

MyCommand.Parameters.Get(New SqlParameter("@Direccion_Permanente", SqlDbType.Char, 50))
MyCommand.Parameters("@Direccion_Permanente").Valu e = Textbox20.Text

MyCommand.Parameters.Get(New SqlParameter("@Tecnico_Instituto", SqlDbType.Char, 40))
MyCommand.Parameters("@Tecnico_Instituto").Value = TextBox17.Text

MyCommand.Parameters.Get(New SqlParameter("@Tecnico_Graduado", SqlDbType.Char, 10))
MyCommand.Parameters("@Tecnico_Graduado").Value = TextBox19.Text

MyCommand.Parameters.Get(New SqlParameter("@Tecnico_Ano_Graduacion", SqlDbType.Char, 8))
MyCommand.Parameters("@Tecnico_Ano_Graduacion").Va lue = TextBox13.Text

MyCommand.Parameters.Get(New SqlParameter("@Tecnico_Titulo", SqlDbType.Char, 40))
MyCommand.Parameters("@Tecnico_Titulo").Value = TextBox29.Text

MyCommand.Parameters.Get(New SqlParameter("@Universitario_Instituto", SqlDbType.Char, 40))
MyCommand.Parameters("@Universitario_Instituto").V alue = TextBox30.Text

MyCommand.Parameters.Get(New SqlParameter("@Universitario_Graduado", SqlDbType.Char, 10))
MyCommand.Parameters("@Universitario_Graduado").Va lue = TextBox33.Text

MyCommand.Parameters.Get(New SqlParameter("@Universitario_Ano_Graduacion", SqlDbType.Char, 8))
MyCommand.Parameters("@Universitario_Ano_Graduacio n").Value = TextBox16.Text

MyCommand.Parameters.Get(New SqlParameter("@Universitario_Titulo", SqlDbType.Char, 40))
MyCommand.Parameters("@Universitario_Titulo").Valu e = TextBox32.Text
MyCommand.Connection.Open()


MyCommand.Parameters.Get(New SqlParameter("@PostGrado_Instituto", SqlDbType.Char, 40))
MyCommand.Parameters("@PostGrado_Instituto").Value = TextBox31.Text

MyCommand.Parameters.Get(New SqlParameter("@PostGrado_Graduado", SqlDbType.Char, 10))
MyCommand.Parameters("@PostGrado_Graduado").Value = TextBox34.Text

MyCommand.Parameters.Get(New SqlParameter("@PostGrado_Ano_Graduacion", SqlDbType.Char, 8))
MyCommand.Parameters("@PostGrado_Ano_Graduacion"). Value = TextBox18.Text

MyCommand.Parameters.Get(New SqlParameter("@PostGrado_Titulo", SqlDbType.Char, 40))
MyCommand.Parameters("@PostGrado_Titulo").Value = TextBox35.Text


MyCommand.Parameters.Get(New SqlParameter("@Empleado_Actualmente", SqlDbType.Char, 40))
MyCommand.Parameters("@Empleado_Actualmente").Valu e = TextBox36


MyCommand.Parameters.Get(New SqlParameter("@Empresa", SqlDbType.Char, 40))
MyCommand.Parameters("@Empresa").Value = TextBox21.Text & TextBox22.Text

MyCommand.Parameters.Get(New SqlParameter("@Cargo", SqlDbType.Char, 40))
MyCommand.Parameters("@Cargo").Value = TextBox25.Text & TextBox24.Text

MyCommand.Parameters.Get(New SqlParameter("@Desde", SqlDbType.Char, 8))
MyCommand.Parameters("@Desde").Value = TextBox23.Text & TextBox26.Text

MyCommand.Parameters.Get(New SqlParameter("@Hasta", SqlDbType.Char, 8))
MyCommand.Parameters("@Hasta").Value = TextBox27.Text & TextBox28.Text


MyCommand.ExecuteNonQuery()

MyCommand.Connection.Close()

End Sub

Yo pense que usando Get traia los datos del registro y lo que hacia era que se lo pasaba a los textbox pero no es asi, y no se que hacer
Gracias de antemano