Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/03/2006, 13:44
Stream
 
Fecha de Ingreso: mayo-2004
Ubicación: Guadalajara, Jalisco, México
Mensajes: 724
Antigüedad: 20 años
Puntos: 6
Si.. siempre al hacer ese tipo de cosas usando session debes comprobar si su variable de session no es nothing

Te hize un codigo...

Cita:
If Not Session("factura") Is Nothing Then
Dim dts As DataSet = Session("factura")

If dts Is Nothing Then
dts = New DataSet
Dim dtable As New DataTable("Facturas")
With dtable
.Columns.Add(New DataColumn("tuCampo1", GetType(System.String)))
.Columns.Add(New DataColumn("tuCampo2", GetType(System.String)))
End With
dts.Tables.Add(dtable)
End If

Dim regst As DataRow
regst = dts.Tables("Facturas").NewRow()
With regst
.Item("tuCampo1") = "tuValor"
.Item("tuCampo2") = "tuValor"
End With
dts.Tables("Facturas").Rows.Add(regst)
End If