Hi. I am currently using LINQ to try and display data from SQL server in to the relevant text boxes on an asp.net form using vb.net. However when I run my form in Visual Studio the data is NOT appearing in the text boxes. To give you a better understanding of what I'm trying to do the code is displayed below.
Using my entities As New HEALTHENTITIES1
Dim health = FROM TBLLALTEST_HEALTH In myEntities.TBLLATEST_HEALTH
Where txtName.Text= TBLLATEST_HEALTH.FORENAME + " " + TBLLATEST_HEALTH.MIDNAME
Where txtSurname.Text= TBLLATEST_HEALTH.SURNAME
Where txtPrevSurname.Text= TBLLATEST_HEALTH.PREVIOUSSURNAME
Where txtBirthSurNAME.Text= TBLLATEST_HEALTH.BIRTHSURNAME
Where txtDOB.Text= TBLLATEST_HEALTH.DOB
Where txtGender.Text= TBLLATEST_HEALTH.GENDER
Where txtAddress.Text= TBLLATEST_HEALTH.ADDRESS1 + " " + TBLLATEST_HEALTH.ADDRESS2 + " " + TBLLATEST_HEALTH.ADDRESS3
Where txtPrevAddress.Text= TBLLATEST_HEALTH.PREVADDRESS1 + " " + TBLLATEST_HEALTH.PREVADDRESS2 + " " + TBLLATEST_HEALTH.PREVADDRESS3
Where txtPostcode.Text= TBLLATEST_HEALTH.POSTCODE
Where txtPrevPostcode.Text= TBLLATEST_HEALTH.PREVPOSTCODE
End Using
I would like to see the details for one person to appear and then be able to click a button which would let me to view the next persons details. If anyone thinks their is a better way of doing this please let me know. The version of Visual Studio I am using is 2010. Thanks, Eamonn.
Using my entities As New HEALTHENTITIES1
Dim health = FROM TBLLALTEST_HEALTH In myEntities.TBLLATEST_HEALTH
Where txtName.Text= TBLLATEST_HEALTH.FORENAME + " " + TBLLATEST_HEALTH.MIDNAME
Where txtSurname.Text= TBLLATEST_HEALTH.SURNAME
Where txtPrevSurname.Text= TBLLATEST_HEALTH.PREVIOUSSURNAME
Where txtBirthSurNAME.Text= TBLLATEST_HEALTH.BIRTHSURNAME
Where txtDOB.Text= TBLLATEST_HEALTH.DOB
Where txtGender.Text= TBLLATEST_HEALTH.GENDER
Where txtAddress.Text= TBLLATEST_HEALTH.ADDRESS1 + " " + TBLLATEST_HEALTH.ADDRESS2 + " " + TBLLATEST_HEALTH.ADDRESS3
Where txtPrevAddress.Text= TBLLATEST_HEALTH.PREVADDRESS1 + " " + TBLLATEST_HEALTH.PREVADDRESS2 + " " + TBLLATEST_HEALTH.PREVADDRESS3
Where txtPostcode.Text= TBLLATEST_HEALTH.POSTCODE
Where txtPrevPostcode.Text= TBLLATEST_HEALTH.PREVPOSTCODE
End Using
I would like to see the details for one person to appear and then be able to click a button which would let me to view the next persons details. If anyone thinks their is a better way of doing this please let me know. The version of Visual Studio I am using is 2010. Thanks, Eamonn.