G
Guest
in a page_load event on a page I am doing, I'm filling textboxes with data from a SQL Server DB
I'm reading using Datareader but if a column contains a NULL, the page Errors.
I realise the datareader firstly retrieves a true/false but how do i use this without impacting my code loads?? I'm stuck and need assistance urgently if poss please
****start of my cod
cn = New SqlConnection("xxxx"
cn.Open(
cmd = New SqlCommand("SELECT * FROM Table Details WHERE Email = @EMail", cn
cmd.parameters.add("@Email", Email.text
rdr = cmd.ExecuteReader(
rdr.Read(
'fill details text boxes on the scree
txtTitle.Text = rdr("Title"
Fname.Text = rdr("FirstName"
****
So, if there is a <NULL> in the FirstName it errors. Please hel
I'm reading using Datareader but if a column contains a NULL, the page Errors.
I realise the datareader firstly retrieves a true/false but how do i use this without impacting my code loads?? I'm stuck and need assistance urgently if poss please
****start of my cod
cn = New SqlConnection("xxxx"
cn.Open(
cmd = New SqlCommand("SELECT * FROM Table Details WHERE Email = @EMail", cn
cmd.parameters.add("@Email", Email.text
rdr = cmd.ExecuteReader(
rdr.Read(
'fill details text boxes on the scree
txtTitle.Text = rdr("Title"
Fname.Text = rdr("FirstName"
****
So, if there is a <NULL> in the FirstName it errors. Please hel