Argument exception

Hi I am trying to get information from two tables in the database but it gives an argument exception saying "Column 'SubContratorID' does not belong to table .”

Which 'SubContratorID' is it referring to …??

String query = @"Select ps.PSubContractID,s.SubContractorID,s.FirstName,s.LastName,s.Position,s.Email,s.TelNo,s.Agency From PSubContract as ps, SubContractor as s Where ps.ID=@id and ps.Phase=@phase and ps.SubContractorID=s.SubContractorID";

Hi I am trying to get information from two tables in the database but it gives an argument exception saying "Column 'SubContratorID' does not belong to table .”

Which 'SubContratorID' is it referring to …??

String query = @"Select ps.PSubContractID,s.SubContractorID,s.FirstName,s.LastName,s.Position,s.Email,s.TelNo,s.Agency From PSubContract as ps, SubContractor as s Where ps.ID=@id and ps.Phase=@phase and ps.SubContractorID=s.SubContractorID";

silly mistake

Still learning C# myself ... but I've been a programmer for over 30 years. The way I would resolve this error is to rebuild the query in stages.

Example ... run the query without the WHERE qualifiers ... if it doesn't whine then you know which portion of the statement its having problems with.

Something else to try, is to build the query statement in SQL itself ... doing that might reveal immediately what the problem is ... and if it doesn't, it may be more detailed in its explanation (when you run it) what the problem is.

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...