|
| |
|
|
yogaboy
Posts: 377 Joined: 5/22/2004 Status: offline
|
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!
|
|
|
|
yogaboy
Posts: 377 Joined: 5/22/2004 Status: offline
|
RE: My hairloss vs Too Few Parameters - 12/6/2004 5:33:20
I had a look at the 4GuysFromRolla article about switching over to OLEDB, but I have a quick question - I'm using an include for the connection strings, won't displaying the full path to the database be a security liablity? Should I stop using the include so it's not available to anyone?? I haven't had any success using VIRTUAL so I have to keep the include file in the same directory as the asp files. I'm not sure if I should worry about this...?
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|