Help with Null Value


Author
Message
Elio Reyes
Elio Reyes
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 46, Visits: 251


Hi



I have to update a 3TH party database, I need to put a null value into field but the field is integer; the mayor problem is that this field has a constraint with other table... But I can't put a default value in the table, is no my.



The bold line shows how I'm trying to do.





With Me.Detalle_Produccion_Exactus1



If Not .Seek("orden_produccion = '" &

Me.Orden_Produccion1.ORDEN_PRODUCCION & "'" & _

" and FECHA_HORA_PRODUC = " & TicketProduccion1.FECTICK & "

AND " & _

" OPERACION = 'GALERA' ") Then

.NewRow()

.ORDEN_PRODUCCION = Me.Orden_Produccion1.ORDEN_PRODUCCION

.ARTICULO = Me.TicketProduccion1.ARTICULO

.OPERACION = "GALERA"

.LOCALIZACION = "ND"

.ESTADO = "N"

.CALIDAD = "P"

.LOTE = "ND"

.DET_PROD_LINEA = nLineaDetalleProduccion

.FECHA_HORA_PRODUC = TicketProduccion1.FECTICK

.BODEGA = "1037"

.CLIENTE = "01-02-00"

.LIQUIDACION = ""

.SERIE_CADENA = IIf(True, DBNull.Value, 0)

nLineaDetalleProduccion = nLineaDetalleProduccion + 1

End If





.CANTIDAD_PRODUCIDA = .CANTIDAD_PRODUCIDA + _

(TicketProduccion1.PRONETA - (TicketProduccion1.RECDIAC +

TicketProduccion1.RECDIAM)) / 1000

nTotalEncabezadoProduccion = nTotalEncabezadoProduccion + _

(TicketProduccion1.PRONETA - (TicketProduccion1.RECDIAC +

TicketProduccion1.RECDIAM)) / 1000

.Save()



End With



Thanks SF



Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I'm not sure I totally understand your problem, but assuming that Detalle_Produccion_Exactus1 is a BO and SERIE_CADENA is an integer property and you need to set a NULL in the db, you have two options:



1. set/return an alternate value for NULL

2. use a nullable type



Both options are setup for a BO within the BO mapper.
Elio Reyes
Elio Reyes
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 46, Visits: 251
Solved



Thanks a Lot
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad you got it working! BigGrin
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search