Código:
y cuando lo ejecuto me sale un error que no puede convertir un valor Integer a String, agradeceria de antemano la ayuda, gracias... Me.conexion.ConnectionString = "Data Source=192.168.1.200,1433;" & "Initial Catalog=Develop;" & "User Id=Help_Desk;" & "Password=rtc-2011;" query = ("select * from HelpDesk_Users where department_id = '" & Me.DropDownList_solicitante.Text & "'") comando = New SqlClient.SqlCommand comando.Connection = conexion comando.CommandText = query Dim cmd As New SqlCommand(query, conexion) Try conexion.Open() cmd.Parameters.AddWithValue("DropDownList_solicitante", TextBox_mail.Text) Dim dt As New DataTable Dim adapter As New SqlDataAdapter(cmd) adapter.Fill(dt) Me.TextBox_mail.Text = dt.Rows(0)("Mail").ToString conexion.Close() Catch ex As Exception MsgBox("Ha habido problemas al intentar establecer conexion" & ex.Message, MsgBoxStyle.Critical) End Try