473,749 Members | 2,636 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();
  4.  
  5.  
  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'";
  8.  
  9.          SqlCommand adoCmdSal = new SqlCommand(sqlSal, adoConnSal);
  10.  
  11.          SqlDataReader adoDRSal = adoCmdSal.ExecuteReader();
  12.  
  13.          if (adoDRSal.HasRows)
  14.          {
  15.              while (adoDRSal.Read())
  16.              {
  17.                  TextBox1.Text = (adoDRSal["Salary.New_Salary"].ToString());
  18.              }
  19.          }
  20.  
  21.          adoDRSal.Close();
  22.          adoDRSal.Dispose();
  23.          adoCmdSal.Dispose();
  24.          adoConnSal.Close();
  25.          adoConnSal.Dispose();
  26.  
  27.  
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 9314
Frinavale
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'";
to:

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

1
2279
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
2
2189
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...
14
10142
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
8
9244
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...
3
2403
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...
2
1716
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
11
2657
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.
1
2249
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...
17
3135
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...
0
8833
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,...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
jinu1996
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...
1
9335
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,...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4709
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...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2218
bsmnconsultancy
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.