Re: Can't display record that has NULL values
Michelle
As the error message states, you cannot cast from DBNull to string. However, there is an easy workaround. The DBNull structure defines the .ToString() method to return an empty string. So you can recode like this and it will work:
txtUserFindID.Text = MyDataReader("user_id").ToString()
txtUserFName.Text = MyDataReader("user_fname").ToString()
txtUserLName.Text = MyDataReader("user_lname").ToString()
txtUserPswd.Text = MyDataReader("user_pwd").ToString()
txtUserPhone1.Text = MyDataReader("user_phone").ToString()
HTH
-reggie
Subject
Written By
Posted
Re: Can't display record that has NULL values
January 16, 2005 07:15PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.