Variable types in COM-Objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kirsten

    #1

    Variable types in COM-Objects

    Hi,

    I have a problem, which is very difficult zu solve, so I try to
    explain short and simple (with examples).

    I get an COM-Object (Crystal Report) in PHP an everything works
    perfectly, but I have problems with one method of the COM-Object (but
    I am not searching for an documentation or help directly for these
    functions! The problem is deeper, please read on!):

    GetNthDefaultVa lue (index)

    Now, I have to explain: With this function I get the default value of
    a parameter field in a Crystal Report. There are different field
    types: Numbers, Strings, Dates, Time,...

    --------------------------------------

    Now my problem, explained in some examples:

    For example, if I want to get a default value of a Date-Field in
    Visual Basic, I call the GetNthDefaultVa lue-function and show the
    result per MsgBox:

    RESULT: 31.10.2003 00:00:00

    If I want to get the value in PHP, there is another result:

    RESULT: 1067554800

    Well, I get the TimeStamp, and this is not really a problem... I can
    convert the time stamp to the date

    NOW THE PROBLEM:

    If I want to do the same with a Time-Field

    Visual-Basic-RESULT: 05:30:00

    PHP-RESULT: -1

    => Error

    Why does this happen? I think, that the called COM-Method is
    overloaded with different variable types? Perhaps PHP wants to convert
    the result into an integer forcefully (there is no Date/Time-structure
    in PHP...), so the function fails? Do work-arounds for such problems
    exist?

    Please help!

    Thank you!
  • Kirsten

    #2
    Re: Variable types in COM-Objects

    Nobody knows anything about this topic?
    I really need help!!

    Comment

    Working...