G
Guest
I run the following code:
objoledbcommand.Connection.Open()
strsql = "select first_name + ' ' + last_name as fullname from
tblperson where pers_entity_id = '" & ddlClient.SelectedValue & "'"
objoledbcommand.CommandText = strsql
objoledbdatareader = objoledbcommand.ExecuteReader
txtClient.Text = objoledbdatareader.Item("first_name")
objoledbcommand.Connection.Close()
and it errors on line "txtClient.Text = objoledbdatareader.item("fullname")
with
no data exists for the row/column.
I ran the exact same query in query analyzer with the correct id in the
where clause and one record is found.
on debug the strsql has all the items it needs in where clause
Any wisdom?
objoledbcommand.Connection.Open()
strsql = "select first_name + ' ' + last_name as fullname from
tblperson where pers_entity_id = '" & ddlClient.SelectedValue & "'"
objoledbcommand.CommandText = strsql
objoledbdatareader = objoledbcommand.ExecuteReader
txtClient.Text = objoledbdatareader.Item("first_name")
objoledbcommand.Connection.Close()
and it errors on line "txtClient.Text = objoledbdatareader.item("fullname")
with
no data exists for the row/column.
I ran the exact same query in query analyzer with the correct id in the
where clause and one record is found.
on debug the strsql has all the items it needs in where clause
Any wisdom?