Am having some SQL (SqlCe) issues I was getting the following error:
There was an error parsing the query.
(1) ERROR:> [Token Line number = 1, Token Line offset 853, Token in error = @clID]
from the following SQL line:
mySQLCommand1.CommandText = "INSERT into clientSubjectiveComplaints (clientSubComplaintCreated,clientSubComplaintModified,clientSubComplaintAge,clientSubComplaintWeight,clientSubComplaintHeight,clientSubComplaintConfirmation,clientSubComplaintEnviorment,clientSubComplaintFood,clientSubComplaintPresentComplaint,clientSubComplaintHistoryofPresentComplaint,clientSubComplaintPastMedicalHistory,clientSubComplaintMedication,clientSubComplaintLastDentalCheckUp,clientID) VALUES (@ClientSubComplaintCreated, @ClientSubComplaintModified, @ClientSubComplaintAge, @ClientSubComplaintWeight, @ClientSubComplaintHeight, @ClientSubComplaintConfirmation, @ClientSubComplaintEnviorment, @ClientSubComplaintFood,@ClientSubComplaintPresentComplaint, @ClientSubComplaintHistoryofPresentComplaint, @ClientSubComplaintPastMedicalHistory, @ClientSubComplaintMedication, @ClientSubComplaintLastDentalCheckUp, @clID";
This was when I was trying to insert into the table clientSubjectiveComplaint.
NOTE: The above db Validates ok.
Assuming after reading around the internet a bit that it might be a Private Key Foreign Key issue but I am not entirely sure.
I changed some of the table to 1:1 relationships (see image below) as it makes more sense anyways but then stated reading that if you have a 1:1 relationship then it expects the Primary Key to be the same for the tables. See Here
So to the QUESTION:
What was meant by the original error (1) and why was i getting the Token error?
And Secondly:
Assuming the PK key issue in the See Here is correct then what is the correct procedure for making 1:1 relationships.
Thanks.