I am using the example from the FAQ's titled - How Can I Add A Record To A Database, but I am trying to update a record, not add it.
I have the following code but get the error:
Application uses a value of the wrong type for the current operation
on the line that starts .Parameters.Append .......
Now, I'm not to sure what this exactly means, but is it something to do with the 4th parameter of the code to add - '50'?
What does this '50' stand for?
Is it the length of the string added?
vb Code:
strSQL = "UPDATE INTO tbl_Code (Code_Text) VALUES (rtfcode.text)" With adoCmd .ActiveConnection = cn .CommandType = adCmdText .CommandText = strSQL .Prepared = True .Parameters.Append .CreateParameter(, adVarChar, adParamInput, 50, rtfCode.Text) .Execute , , adCmdText + adExecuteNoRecords End With




Reply With Quote