Thank you, but I'm not sure I understand your answer completely.
In MyFunc(), I did a Select Case for IsDBNull(), but it still didn't like
getting a null value when it expected a string, and it crashed. I suppose I
could do a Try-Catch for this specific exception, but I'm now mainly curious
about my original solution.
Do you have any insights on why you have to change Private to Public on an
overloaded function?
Thanks,
Dave
"Landley" <ne**@creations-software.co.uk> wrote in message
news:Ou**************@TK2MSFTNGP15.phx.gbl...
This cannot be erroring in the method's signature. If the value of the
argument is null, this can be passed into the method. It just needs
checking before it is used.
Landers
"Dave" <da*****************************@stic.net> wrote in message
news:uu**************@TK2MSFTNGP11.phx.gbl... I have a function 'Private MyFunc(ByVal dbS as String) As Boolean' where
dbS is a database value determined by the database reader method.
I was having some difficulty when dbS is null, so I decided to create an
overloaded function: 'Private Overloads MyFunc(ByVal dbS as DBNull) As
Boolean'. I added the Overloads keyword to the original also, of course.
This resulted in the run-time error "Public member 'MyFunc' on type
'MyClass' not found."
This did not make sense, but on a whim, I changed the Private
declarations to Public, and it worked fine. Can anyboday explain this? Why does
overloading change the requirements of Private/Public?
Thanks,
Dave