DBNull?

  • Thread starter Thread starter Brent
  • Start date Start date
B

Brent

We are gradually upgrading our vb6 code to .net. A lot of our shared modules
in vb6 we are upgrading to .Net dlls that are shared. One problem we have is
that we have VB6 modules that have optional parameters that default to null.
Of course interopt converts these to dbnull. The only problem with dbnull is
that you can not use it as a default for a parameter since it is not a
constant. Is there anyway to get around this? Currently we use
Integer.MinValue and in each function we have to check every paramater that
was optional to see if its = Integer.minvalue then convert it to dbnull.
Please tell me there is a better way than this.

thanks,
brent
 
Back
Top