I am using VB6 and Access 97 with ADO 2.1
I can successfully read Memo fields from an Access database using an
ADODB recordset. The memo lines are at maximum 350 characters long.
I am trying to Add and Update a Memo field in an Access 97 database
using ADO 2.1, though a stored procedure (query) in the access
database.
I cannot find a match between the data type and the length using the
Parameter statement. All my attempts so far have met with failure
usually due to wrong type of data or length mismatches.
The closest I have got so far is the code following. gMEMOSIZE is the
size of the field returned to me when I used the OpenSchema to examine
the table I was using. The data type was 129 (adChar) and the length
given (Maximum _Character_Size) was this very large number.
Plugging these into the parameter statement and executing the program
came up with ...
"Run Time Error -2147217887 (80040e21) Invalid Precision Value"
and the program fails on the cm.Execute line
The offending code is.....
Global Const gMEMOSIZE = 2147483647
' ********* code that doesn't work......
Set cm = New ADODB.Command
With cm
.ActiveConnection = dbConn
.CommandText = gSPFormFiltersUpdate
.CommandType = adCmdStoredProc
End With
'
' Load the Parameters
'
cm.Parameters.Append cm.CreateParameter("pLabelList", adChar, _
adParamInput, gMEMOSIZE, frmFormFilters.txtLabelList)
cm.Execute lRecsAffected
How do I update and / or add data to a Memo field in an Access
Database using a Parameter Statement trhough ADO?