Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sp_OAMethod and 255 character limit in parameters

Author  Topic 

blake
Starting Member

29 Posts

Posted - 2001-06-07 : 17:09:44
I've been trying to call sp_OAMethod to pass a parameter which has more than 255 characters and have had no luck. Looking at the docs, the data type conversion between Visual Basic and SQL Server follows this method:

< 255 character string in VB = varchar in SQL Server

> 255 character string in VB = text in SQL Server

The result being that whenever a string is passed as a parameter, it is truncated to 255 characters even if it's a varchar(4000).

The problem is that I haven't found a way to pass a parameter of type text when calling sp_OAMethod. And local variables can't be of type text/ntext/image either. I've tried using cast, putting in a subquery, etc. but it errors out. It only seems to want a local variable or a constant string (which gets truncated at 255 characters).

Is it possible to use a text value for calling sp_OAMethod?
   

- Advertisement -