Re: Bug or limitation in the functionality of sp_OAMethod

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 07/28/04


Date: Tue, 27 Jul 2004 20:34:32 -0500


> This problem seems to basic not to have an easy solution.

SQL 2005?

:-)

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
<anonymous@discussions.microsoft.com> wrote in message
news:546d01c4742f$77342ed0$a601280a@phx.gbl...
> That occured to me as well, but it defeats the purpose of
> code reuse IMO.
>
> This problem seems to basic not to have an easy solution.
> >-----Original Message-----
> >
> >"James Hall" <ahall4@isdn.net> wrote in message
> >news:547a01c47416$364d13a0$a501280a@phx.gbl...
> >> It appears that passing a "space" (ASCII 32) character
> (s)
> >> using a CHAR data type through a parameter in the
> >> execution of sp_OAMethod actually results in an empty
> >> string being passed to the COM object instead.
> >>
> >> This appears to be occurring because the string that is
> >> passed as a parameter has all trailing spaces trimmed
> >> like you would expect from a varchar data type in a
> >> column.
> >>
> >> I have confirmed that the stored procedure sp_OAMethod
> >> IS passing an empty string to the COM object's method
> >> when in fact a single space character is specified.
> >>
> >
> >There are tons of frustrating pitfals like this with the
> sp_OAxxx
> >procedures.  COM and TSQL are just very different
> animals.
> >
> >I almost always end up writting COM wrapper object
> specifically designed to
> >work with sp_OAxxx and call my real COM component.
> >
> >David
> >
> >
> >.
> >


Relevant Pages

  • Re: Bug or limitation in the functionality of sp_OAMethod
    ... This problem seems to basic not to have an easy solution. ... >> using a CHAR data type through a parameter in the ... >> string being passed to the COM object instead. ... >I almost always end up writting COM wrapper object ...
    (microsoft.public.sqlserver.programming)
  • Re: Character encodings
    ... Here's hoping someone knows of any easy solution. ... I'm looking for an easy way to remove french characters and replace them ... > with their english equivalent. ... > English String: J??l ...
    (comp.lang.java.help)
  • Re: Breaking up Strings correctly:
    ... I have been searching for an easy solution, ... Suppose I have a string of expressions such as: ... valstack.append([op, lhs, rhs]) ...
    (comp.lang.python)
  • Re: SQL Syntax for a single quote in a string.
    ... Use a parameter for the string value. ... That is the easy solution. ... Bill Todd (TeamB) ...
    (borland.public.delphi.database.ado)