JDL129
asked on
Query problem in XSD in C#
Hey guys another problem.
The following code in a table adapter:
SELECT MemberID, FirstName, Middle, LastName, RoleID, MemberStatusID, GoesByName, FamilyCode, WorkStatusID, EmployerID, UseFamilyAddress,
Address, Address2, City, State, ZipCode, HomePhone, HomeFaxPhone, HomeCellPhone, HomeEMail, WorkPhone, WorkFaxPhone, WorkCellPhone,
WorkEMail, MailLabelLine1, MailLabelLine2, OccupationID, Sex, Student, Retired, MemberShipDate, Anniversary, Birthday, BaptizedDate,
MaritalStatus, BloodType, ProjectedGraduationDate, InvolvementFormDate, Notes, LastUpdate
FROM tblMember
WHERE (FirstName LIKE @fname) ORDER BY LastName
gives errors of: Error in where clause near '@'
Error in where clause near 'ORDER'
I have the exact same type of query in another program that uses the same WHERE clause and it works perfectly.
Any help would be appreciated!!
Jerry
The following code in a table adapter:
SELECT MemberID, FirstName, Middle, LastName, RoleID, MemberStatusID, GoesByName, FamilyCode, WorkStatusID, EmployerID, UseFamilyAddress,
Address, Address2, City, State, ZipCode, HomePhone, HomeFaxPhone, HomeCellPhone, HomeEMail, WorkPhone, WorkFaxPhone, WorkCellPhone,
WorkEMail, MailLabelLine1, MailLabelLine2, OccupationID, Sex, Student, Retired, MemberShipDate, Anniversary, Birthday, BaptizedDate,
MaritalStatus, BloodType, ProjectedGraduationDate, InvolvementFormDate, Notes, LastUpdate
FROM tblMember
WHERE (FirstName LIKE @fname) ORDER BY LastName
gives errors of: Error in where clause near '@'
Error in where clause near 'ORDER'
I have the exact same type of query in another program that uses the same WHERE clause and it works perfectly.
Any help would be appreciated!!
Jerry
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the post guys!!
I might not have made this clear but the is a sql from a table adapter. I have another program that my code works perfectly in but it seems that in this program I can't use a variable. Is there some setting I'm missing?
Thanks guys!!
Jerry
I might not have made this clear but the is a sql from a table adapter. I have another program that my code works perfectly in but it seems that in this program I can't use a variable. Is there some setting I'm missing?
Thanks guys!!
Jerry
ASKER
Thanks for the help!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!
If yes, can you post how?