|
yogaboy -> My hairloss vs Too Few Parameters (12/5/2004 18:35:54)
|
I get the following error far too much for my sanity [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. when I run use this sql statement mySQL = "SELECT Org.OrgName, Org.Website, Org.OrgCode, Partnerships.cpName FROM Org, Partnerships " & _ "WHERE Partnerships.cpCode='" & CPSelected & "' AND Org.cpCode=Partnerships.cpCode2 ORDER BY Org.OrgName" but, if I use this sql statement it works (spot the difference!!!) mySQL = "SELECT Org.OrgName, Org.Website, Org.OrgCode, Partnerships.cpName FROM Org, Partnerships " & _ "WHERE Partnerships.cpCode='" & CPSelected & "' AND Org.cpCode=Partnerships.cpCode ORDER BY Org.OrgName" If you can't see the difference, I don't blame you - the first statement has AND Org.cpCode=Partnerships.cpCode2 the second statement has AND Org.cpCode=Partnerships.cpCode The 2 columns in the database are exactly the same, I even copied the first one into the second one. Does anyone have any ideas why this is happening, as I'm pulling out so much hair I'll be bald by tomorrow afternoon![:@]
|
|
|
|