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!

EOleException 'Parameter ??? has no default value'

Status
Not open for further replies.

amroberts

Programmer
Jun 21, 2010
13
ZA
Hi there,
I have a MS access application where I'm trying to merge two databases. When I call the execute function of an ADOCommand I get the following error message: Project ... raised exception class EOleException with message 'Parameter AFR has no default value'.
AFR is actually a value of the "ConsultantID" field in the db table I'm trying to update.
Here is the CommandText of the ADOCommand:

"UPDATE WaterTreatmentWorks SET WorksName =\"" + consultantDataTable->FieldByName("WorksName")->AsString + "\", ConstructionDate =\"" + consultantDataTable->FieldByName("ConstructionDate")->AsString + "\" WHERE ConsultantID = " + consultantID

I'm pretty sure the SQL syntax is correct because it executes fine when none of the values in the "ConsultantID" field in the db table match the consultantID variable in the WHERE clause(if that makes sense). But it keeps giving me the error otherwise...

If anyone could help I would greatly appreciate it!

Thank you,
Andrew
 
Code:
... WHERE ConsultantID = [!]'[/!]" + consultantID[!] + "'"[/!]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV, thanks for the prompt reply but I actually tried that... its not the SQL syntax, I've tested the query so it must be something else... :)
 
I've tested the query
How ?
Which SQL code ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Ok, got it working... tested it again with your change and I changed the = sign to "LIKE" and it works.

Thank you for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top