473,701 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting Error: The multi-part identifier "Table.Fiel d" could not be bound.

10 New Member
I am recieving this error from my code:
The multi-part identifier "PAR.Unique ID" could not be bound.
The multi-part identifier "Salary.UniqueI D" could not be bound.
The multi-part identifier "PAR.Unique ID" could not be bound.
The multi-part identifier "PAR.PAR_Status " could not be bound.
The multi-part identifier "Salary.New_Sal ary" could not be bound.
The multi-part identifier "Salary.UniqueI D" could not be bound.
The multi-part identifier "PAR.Unique ID" could not be bound.
The multi-part identifier "PAR.PAR_Status FROM" could not be bound.
Invalid column name 'PAR'.

Expand|Select|Wrap|Line Numbers
  1. SqlConnection adoConnSal = new SqlConnection("server=DEL-CD212; uid=sa;" +
  2.                     "pwd=graver; database=PAR");
  3.          adoConnSal.Open();
  6.          string sqlSal = "SELECT Salary.New_Salary, Salary.UniqueID, PAR.UniqueID, PAR.PAR_Status";
  7. sqlSal += "FROM Salary, PAR WHERE PAR.UniqueID=Salary.UniqueID AND PAR.UniqueID='100002' AND PAR.PAR_Status= 'current'";
  9.          SqlCommand adoCmdSal = new SqlCommand(sqlSal, adoConnSal);
  11.          SqlDataReader adoDRSal = adoCmdSal.ExecuteReader();
  13.          if (adoDRSal.HasRows)
  14.          {
  15.              while (adoDRSal.Read())
  16.              {
  17.                  TextBox1.Text = (adoDRSal["Salary.New_Salary"].ToString());
  18.              }
  19.          }
  21.          adoDRSal.Close();
  22.          adoDRSal.Dispose();
  23.          adoCmdSal.Dispose();
  24.          adoConnSal.Close();
  25.          adoConnSal.Dispose();
I can't figure out what the issue is. I know the SQL works because I ran it in SQL Server. It is giving the error at line 11. Thanks.
Jun 27 '07 #1
1 9309
9,735 Recognized Expert Moderator Expert
Hi MKnoll217!

Humor me and try changing:
Expand|Select|Wrap|Line Numbers
  1. tring sqlSal = "SELECT Salary.New_Salary, Salary.UniqueID, PAR.UniqueID, PAR.PAR_Status";
  2. sqlSal += "FROM Salary, PAR WHERE PAR.UniqueID=Salary.UniqueID AND PAR.UniqueID='100002' AND PAR.PAR_Status= 'current'";

Expand|Select|Wrap|Line Numbers
  1. tring sqlSal = "SELECT Salary.New_Salary, Salary.UniqueID, PAR.UniqueID, PAR.PAR_Status";
  2. sqlSal += " FROM Salary, PAR WHERE PAR.UniqueID=Salary.UniqueID AND PAR.UniqueID='100002' AND PAR.PAR_Status= 'current'";
Jun 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: L Mehl | last post by:
On my cmdSaveRecord, I check a couple of fields to confirm that an entry has been made before allowing the Save. I decided to - not put validation rules in table structure, and - validate on Save to avoid annoying the user if a field was left empty before clicking cmdSaveRecord For each field validated in this way, I was getting an error something like
by: deko | last post by:
This may be an easy question, but for some reason the multiple table design idea is throwing me. I'm trying to avoid using one large, wide table - so I've got multiple tables that hold different categories of information about each record - address information in one table, contact information in another table, order-related information in a third, and so on. The "Customer" table has an AutoNumber "Cust_ID" as a PK, which is the main...
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought I should give back to the community by posting our findings. Thanks you all for all your help till now by posting problems and their solutions. ~Abhijit
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a Timestamp field. The problem is that when a new record is entered, either from a form or from the table view of the table, when the record gets saved it immediately displays #DELETED# in all of the fields. However, if I close the form or table view and reopen the record has in fact been inserted. The...
by: yb | last post by:
I have a unbound mult-select listbox field named "Locations".Multi-select option is set to "Extended". I'm having problem saving the values from this field into table. I have text column currLocations in the table in which I want to store the selected values. I do not want to go with the approach of creating another hidden textbox on the form and write code in AfterUpdate of the listbox field to populate the selected values into the...
by: samdev | last post by:
I need to set up invoices so each new invoice has next available number assigned. I have a table Named "InvoiceNumbers" that has a single field = "nextnumber" A 2nd table that contains the sales transaction info including a field named "invno". Then created a form to input the sales and in the form is where I want
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in tblPeople called PreferredPet. 2. A lookup field that stores text values. Create a text field in tblPeople called PreferredPetID and use it to lookup an identical text field in tblPreferredPets.
by: mark4asp | last post by:
I have a table bound to a repeater. There is a DateTime column called EntryDate. When the EntryDate changes day I want to write the date out. I want to compare the value of an item from a table column with a public variable and then set the variable to the value of that item when the days change Can I access the value of EntryDate column? If so how? Clearly not by using Eval because that requires me to bind it so something which I...
by: trose178 | last post by:
Good day all, I am working on a multi-select list box for a standard question checklist database and I am running into a syntax error in the code that I cannot seem to correct. I will also note that I am using Allen Browne's multi-select list box for a report as a guide. I should also note that my access skills are not the best so I may need some explaining on certain things. First let me give some background on the database: I have a...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.