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 under SQL 2000 trims parameters?!?!?

Author  Topic 

MuffinMan
Posting Yak Master

107 Posts

Posted - 2001-10-15 : 16:57:03
I have a stored procedure that calls an ActiveX COM object that I wrote. The maximum length for the parameters of sp_OAMethod is 255 characters (a SQL Server limitation). This was a problem for me. To get around this, I wrote some looping code in my sp that passed the parameters in chunks of 255 characters and I then concatenate them in my COM object.

This worked fine under SQL 7.0. However, SQL 2000 is trimming blank spaces off the end of my parameters.

For example, in the string below, a space appears a position 255


( character position )
2 2 2 2 2
5 5 6 6 7
====0====5====0====5====0
.... Mary had a little ...


Thus, SQL 2000 only passes 254 characters to my COM object and when I concatenate the values, I get
.... Maryhad a little ....
instead of
.... Mary had a little ....

Has anyone else run into this problem?

Thanks,

MuffinMan



Edited by - muffinman on 10/15/2001 16:57:58
   

- Advertisement -