Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/02/2012, 10:09
Avatar de Fann_Lavigne
Fann_Lavigne
 
Fecha de Ingreso: diciembre-2004
Mensajes: 622
Antigüedad: 20 años, 2 meses
Puntos: 12
Respuesta: poner valores en textarea

No veo en que parte de tu consultas se guarde en el dataset, o haria algo asi:

Código VB:
Ver original
  1. SQL_Sicoss = New SqlClient.SqlConnection(Session("ConnectionNET"))
  2. Dim SQLA_Documento As New SqlClient.SqlDataAdapter("Select * From Documento Where Documento_ID = @DocID", SQL_Sicoss)
  3. Dim dbDoc As New DataSet
  4. SQLA_Documento.Fill(dbDoc,"MisDatos")
  5.  
  6. DOCID = al id del documento a editar.
  7.  
  8.  
  9.  
  10. If DocID < 0 Then
  11. textarea.Content = (" <br /> " _
  12. & " <br /> " _
  13. & " &nbsp; <br /> " _
  14. & " <div style=""text-align: center""><span style=""font-weight: bold"" class=""style2"">*** Elabore su Documento aquí ***</span></div> ")
  15.  
  16. txt_Titulo.Visible = True
  17. txt_descripcion.Visible = True
  18. Else
  19. If dbDoc.Tables("MisDatos").Rows.Count > 0 Then
  20. textarea.Content = dbDoc.Tables("MisDatos").Rows(0)("MiId") 'Suponiendo que la consulta solo traiga una fila, aqui se accede a la primera, con el indice en cero, tambien en la consulta debera existir la columna MiId o la del valor que quieres poner en el TextBox
  21. dbDoc.Tables.Remove("MisDatos") 'Borramos la tabla del DataSet para evitar comportamientos raros
  22. End IF
  23.  
  24. txt_Titulo.Visible = False
  25. txt_descripcion.Visible = False
  26. End If
__________________
"Entre Mas Brillante Es Una Mente, Tiene Que Luchar Contra Demonios Internos Mas Poderosos"
[email protected]

Última edición por Fann_Lavigne; 10/02/2012 a las 10:12 Razón: Coreccion en codigo de ejemplo Row por Rows