Can not Insert Null Value When I save


Author
Message
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Cannot insert the value NULL into column 'swst_pk', table 'ProRodeo.dbo.SWStocks'; column does not allow nulls. INSERT fails.
The statement has been terminated.

I get the above error when I try the following code?

SwStockBO1.NewRow()

SwStockBO1.swst_pk = 1

SwStockBO1.stock = 1000

' Save New Record

If SwStockBO1.Save() <> MicroFour.StrataFrame.Data.SaveUndoResult.Success Then

MsgBox("Save New Record Failed")

End If

I'm a newbie so what am I missing? TIA.

Reply
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
PS.

The table has only 2 fields. swst_pk, and stock. Both are integer and don't allow nulls.

I also tried playing with Return Alternate on Null in the BO Mapper but could not get that working. Also, played with AllowNullValueonNewRow in the properties using both True and False and did not get that to work either. My version of SF is 1.6.6.0

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