Scott,
In addition to the other comments, depending on the app, I convert the NULLs
to valid values on the database, for example "" for strings & 0 for
integers. As this simplifies the VB.NET code (no need to check for NULLs in
VB.NET.
This is easiest done in your Stored Procedure or the SQL Select statement
you are using to retrieve data.
Note: I normally convert "" & 0 back to NULL in the Update/Insert Stored
Procedure, of course this means that "" & 0 are no longer valid for a
database field, which may be a problem...
Hope this helps
Jay
"Scott" <ni**********@pandora-dot-be.no-spam.invalid> wrote in message
news:40********@Usenet.com...
Hello all !
I'm working on a project which needs to connect quite frequently to a
database. When I'm tryin to retrieve data and some columns contain a
null value, my program crashes and I get the error : 'conversion from
DBNull to String is invalid'...
How can I solve this?
Thanks in advance !
Scott
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com