initialising Properties correctly

  • Thread starter Thread starter Craig G
  • Start date Start date
C

Craig G

i use a class for all by database actions, the class has the following
properties
Private m_intDrugid As Integer
Private m_intInumber As Integer
Private m_intEnumber As Integer
Private m_strDrugname As String
Private m_strDoseage As String

i'm having problems when i assign all of the values in the properties to a
method that inserts a record in a Oracle(7) table via a stored proc

not all of the values need to be populated, i.e. they can be Nulls. problem
is. how do i set them to Null so that the it will insert the record
correctly. if i populate all the properties the method will fire
sucessfully.

is there a way to initialise them to the correct Null so to speak

Cheers,
Craig
 
Craig:

You can assign Nothing to a String field to represent null, but it's
not possible to assign Nothing to a value type like an Integer. If you
need a nullable field you might need to make the field type Object, or
wrap an Integer inside of a new class.
 
Back
Top