Professional Web Applications Themes

Executing COM object methods via T-SQL - Microsoft SQL / MS SQL Server

Hi Greg, Thanks so much again for your help. I have managed to get hold of the source code for the function below... function Logon(OperatorGroupID: Integer; const OperatorLogon, OperatorPassword: WideString; out ReturnValue : Integer): HResult; safecall I have also tried declaring the id field as both an int or smallint and no luck. How can I troubleshoot this further? Thanks again Brett *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...

  1. #1

    Default Re: Executing COM object methods via T-SQL

    Hi Greg,

    Thanks so much again for your help.

    I have managed to get hold of the source code for the function below...

    function Logon(OperatorGroupID: Integer; const OperatorLogon,
    OperatorPassword: WideString; out ReturnValue : Integer): HResult;
    safecall

    I have also tried declaring the id field as both an int or smallint and
    no luck.

    How can I troubleshoot this further?

    Thanks again

    Brett

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Brett Guest

  2. #2

    Default Re: Executing COM object methods via T-SQL

    Hi Brett,

    Do you initialize all the variables in SQL before you pass them to the COM
    Object? Unitialised variables are NULL in T-SQL, and if IIRC not all
    datatypes in VB have NULL support.

    --
    Jacco Schalkwijk MCDBA, MCSD, MCSE
    Database Administrator
    Eurostop Ltd.


    "Brett Levin" <net> wrote in message
    news:phx.gbl... 


    Jacco Guest

  3. #3

    Default Re: Executing COM object methods via T-SQL

    Hi Jacco

    Thanks heaps for getting back to me.

    I havent initialised the variables but am assigning them values before
    executing the method. Does this matter?





    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Brett Guest

  4. #4

    Default Re: Executing COM object methods via T-SQL

    Setting and initializing them should work the same, as long as you do not
    set them to NULL of course. Do you also assign a value to return?

    --
    Jacco Schalkwijk MCDBA, MCSD, MCSE
    Database Administrator
    Eurostop Ltd.


    "Brett Levin" <net> wrote in message
    news:phx.gbl... 


    Jacco Guest

  5. #5

    Default Re: Executing COM object methods via T-SQL

    I set it to 0.

    Is there anyway to find out what delphi datatypes translate to in SQL?

    Do you think this is where my problem lies?


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Brett Guest

  6. #6

    Default Re: Executing COM object methods via T-SQL

    Hi Brett.

    I didn't see this post in time, but I actually just posted this info in my
    last post in this thread..

    Calls are made from SQL Server to the Delphi program over an intermediate
    layer called IDL ([I]nterface [D]efinition [L]anguage). IDL is a part of COM
    / ActiveX.

    The real parameter types you need are actually the COM types, not the Delphi
    types, so if you can follow the instructions I laid out in my other post,
    you could post the IDL for the Delphi .dll & we can give you a solid answer
    on your problem.

    Regards,
    Greg Linwood
    SQL Server MVP

    "Brett Levin" <net> wrote in message
    news:#phx.gbl... 


    Greg Guest

Similar Threads

  1. Accessing Overloaded methods when Consuming an Object via a Web Reference
    By recoil@community.nospam in forum ASP.NET Web Services
    Replies: 2
    Last Post: April 13th, 03:39 PM
  2. Replies: 2
    Last Post: December 3rd, 05:12 PM
  3. odd problem calling object methods
    By Bill in forum PHP Development
    Replies: 4
    Last Post: November 5th, 12:45 AM
  4. hash reference to object methods
    By Uri Guttman in forum PERL Miscellaneous
    Replies: 0
    Last Post: August 12th, 08:54 PM
  5. IntrOOspection: ISO an object's methods set
    By J Krugman in forum PERL Miscellaneous
    Replies: 2
    Last Post: July 28th, 10:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139