The multi-part identifier "PAR.UniqueID" could not be bound.
The multi-part identifier "Salary.UniqueID" could not be bound.
The multi-part identifier "PAR.UniqueID" could not be bound.
The multi-part identifier "PAR.PAR_Status" could not be bound.
The multi-part identifier "Salary.New_Salary" could not be bound.
The multi-part identifier "Salary.UniqueID" could not be bound.
The multi-part identifier "PAR.UniqueID" could not be bound.
The multi-part identifier "PAR.PAR_StatusFROM" could not be bound.
Invalid column name 'PAR'.
Expand|Select|Wrap|Line Numbers
- SqlConnection adoConnSal = new SqlConnection("server=DEL-CD212; uid=sa;" +
- "pwd=graver; database=PAR");
- adoConnSal.Open();
- string sqlSal = "SELECT Salary.New_Salary, Salary.UniqueID, PAR.UniqueID, PAR.PAR_Status";
- sqlSal += "FROM Salary, PAR WHERE PAR.UniqueID=Salary.UniqueID AND PAR.UniqueID='100002' AND PAR.PAR_Status= 'current'";
- SqlCommand adoCmdSal = new SqlCommand(sqlSal, adoConnSal);
- SqlDataReader adoDRSal = adoCmdSal.ExecuteReader();
- if (adoDRSal.HasRows)
- {
- while (adoDRSal.Read())
- {
- TextBox1.Text = (adoDRSal["Salary.New_Salary"].ToString());
- }
- }
- adoDRSal.Close();
- adoDRSal.Dispose();
- adoCmdSal.Dispose();
- adoConnSal.Close();
- adoConnSal.Dispose();