Developer technologies | VB
An object-oriented programming language developed by Microsoft that can be used in .NET.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When joining 3 SQL tables using the code below I receive the following error message.
System.Data.SqlClient.SqlException
HResult=0x80131904
Message=The multi-part identifier "fpapdoption.facct" could not be bound.
Source=.Net SqlClient Data Provider
Dim strSelect1 = "SELECT fosterparent.facct, classify, l_code, sacct, last_name, first_name, last_o, first_o, " &
"county, status, birth_date, birth_da_o, dl_no, dl_no_o, education, educ_s, race, race_o, fa_book, income, ladder, " &
"addr_mail, mar_status, l_code, pool_fence, religion, relig_o, ss_no, ss_no_o, sacct, spa_pict, ncer_date, " &
"fprecert.first_b, fprecert.first_1, first_2, last_b, last_1, last_2, " &
"fpadoption.ml_rec, fpadoption.ml_rec_o, fpadoption.ml_rec_b, fpadoption.ml_rec_1, fpadoption.ml_rec_2 " &
"FROM fosterparent " &
"JOIN fprecert ON fosterparent.facct = fprecert.facct " &
"JOIN fpadoption ON fosterparent.facct = fpapdoption.facct " &
"WHERE fosterparent.status2 = 'Approved' and (fosterparent.status = 'Apprvd-Active' or fosterparent.status = 'Cert.-Active')"
Dim FieldName = String.Empty
Dim objCommand1 As New SqlCommand(strSelect1, objConnection)
' Open connection if closed
If objConnection.State = ConnectionState.Closed Then objConnection.Open()
objSQLDataReader1 = objCommand1.ExecuteReader()
Any ideas?
An object-oriented programming language developed by Microsoft that can be used in .NET.
Answer accepted by question author
Replace fpapdoption with fpadoption.