Setting foreign key values to null using property set that is a long

R

Ratman

I have this...

Public Property MetalID() As Long
Get
Return lMetalID
End Get
Set(ByVal Value As Long)
lMetalID = Value
End Set
End Property

on my webform I have this...

oPiece.MetalID = CType(ddlMetalID.SelectedValue, Long)

The prolem is that this value can be null and the top item in the
dropdown has a value of "". If I set it to 0, it will make it into
the property but still needs to be set to null somehow.

Any ideas?

Thanks in advance,

Ratman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top