Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADO Connection Errors Collection

8 views
Skip to first unread message

donb...@my-deja.com

unread,
Jan 13, 2000, 3:00:00 AM1/13/00
to
Trying to write the following to a file:

print OUTPUT ($oConn->Errors("Errors")->{Number}->{'Value'} . "\n");
print OUTPUT ($oConn->Errors("Errors")->{Description}->
{'Value'} . "\n");

Can't get anthything out of the collection.
Any suggestions.

Don


Sent via Deja.com http://www.deja.com/
Before you buy.

donb...@my-deja.com

unread,
Jan 13, 2000, 3:00:00 AM1/13/00
to

Tobias Martinsson

unread,
Jan 15, 2000, 3:00:00 AM1/15/00
to

> print OUTPUT ($oConn->Errors("Errors")->{Number}->{'Value'} . "\n");
> print OUTPUT ($oConn->Errors("Errors")->{Description}->
> {'Value'} . "\n");
>
> Can't get anthything out of the collection.
> Any suggestions.

The Errors-collection take an index-value for which Error object you
want to return or which property of an error object that you want to
return.

Try the following where index is an integer (0,1,2,3,etc; index
normally starts with zero) representing the Error object that you wish
to access:

$index = 0;
print FILE $conn->Errors($index)->{Description};

You syntax is great except for one thing that is not necessary:you
don't need to reference "{Value}" since each property of an Error
object will return a string or a number.

Tobias

0 new messages