adLongVarChar - error 3421 
Author Message
 adLongVarChar - error 3421

I'm inserting data into SQL Server 7.0 using ADO commands in a VB6 COM
object with a stored procedure and I get this error in this one class but
not in other classes in the same object.

The following is my code to collect a textarea field of a form.

Dim m_Comments As String
m_Comments = dbData.EscapeApostrophe(Trim(MyRequest.Form("Comments")))
cm.Parameters.Append cm.CreateParameter("Comments", adLongVarChar,
adParamInput, 201, m_Comments)

This is the exact error:

+++++++++++++++++++
Run-time error '3421':

Application uses a value of the wrong type for the current operation.
+++++++++++++++++++

This is one of 38 parameters that is going to a stored procedure in this COM
object.  I have other classes in this COM object that are using the same
format for CreateParameter and they work.

Does anyone know what this error means and why I'm getting it?

Thanks,

King Wilder

--
----------------------
Gizmo Beach
www.gizmobeach.com

626 351-4334
---------------------



Tue, 14 Jan 2003 03:00:00 GMT  
 adLongVarChar - error 3421

Are you sure the base table has the same type?
You can make a check by opening a recordset from the underlying table and
checking the type property of said field in debug mode.

--
http://www.appfind.com/
the software development exchange


Quote:
> I'm inserting data into SQL Server 7.0 using ADO commands in a VB6 COM
> object with a stored procedure and I get this error in this one class but
> not in other classes in the same object.

> The following is my code to collect a textarea field of a form.

> Dim m_Comments As String
> m_Comments = dbData.EscapeApostrophe(Trim(MyRequest.Form("Comments")))
> cm.Parameters.Append cm.CreateParameter("Comments", adLongVarChar,
> adParamInput, 201, m_Comments)

> This is the exact error:

> +++++++++++++++++++
> Run-time error '3421':

> Application uses a value of the wrong type for the current operation.
> +++++++++++++++++++

> This is one of 38 parameters that is going to a stored procedure in this
COM
> object.  I have other classes in this COM object that are using the same
> format for CreateParameter and they work.

> Does anyone know what this error means and why I'm getting it?

> Thanks,

> King Wilder

> --
> ----------------------
> Gizmo Beach
> www.gizmobeach.com

> 626 351-4334
> ---------------------



Sat, 01 Mar 2003 07:04:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. runtime error '3421' datatype convertion error

2. Error 3421 - Data Conversion Error - HELP!!

3. runtime error '3421' datatype convertion error

4. 3421 errors on same code after installing Win2000 SP2

5. ADO runtime error 3421.

6. Error 3421 on OpenRecordSet

7. error 3421 on compactdatabase

8. Parameters Date Field gives Run-time Error 3421??????

9. Error 3421 during Access database maintenance with ADOX

10. ADO Error 3421 & char data

11. Parameters Date Field gives Run-time Error 3421??????

12. DataErr 3421

 

 
Powered by phpBB® Forum Software