Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADOQuery problem

Status
Not open for further replies.

MLNorton

Programmer
Nov 15, 2009
134
US
I am trying to set the SQL Query. The following is my code:

SELECT LastName, FirstName, ExpYearMonDay, UserName, Password

FROM Membership
WHERE UserName IS NOT NULL
ORDER BY UserName

When I try to set the ADOQuery1 to true, I get the following error message.

Parameter UserName has no default value.
 
I'm guessing that UserName isn't in your table. Or that UserName is a reserved word in your database.
 
What engine are you using? Could it be case sensitivity in the column names? I'm used to MSSQL without case sensitivity.

JD Solutions
 
Going on with what DjangMan said, if it is reserved, enclose it in [] so make it [UserName]

JD Solutions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top