By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,747 Members | 1,671 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,747 IT Pros & Developers. It's quick & easy.

Variable types in COM-Objects

P: n/a
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!):

GetNthDefaultValue (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 GetNthDefaultValue-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!
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Nobody knows anything about this topic?
I really need help!!
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.