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
That was it. Thank you very very much. The help here is excellant.Smile
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