Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

MethodFailureException

2 posts in DataWindow .NET Last posting was on 2004-10-17 21:10:34.0Z
Jack Addington Posted on 2004-10-14 17:53:24.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
Subject: MethodFailureException
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
Message-ID: <416ebd14$1@forums-1-dub>
Date: 14 Oct 2004 10:53:24 -0700
X-Trace: forums-1-dub 1097776404 68.147.193.82 (14 Oct 2004 10:53:24 -0700)
X-Original-Trace: 14 Oct 2004 10:53:24 -0700, s010600e018e32f17.cg.shawcable.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:536
Article PK: 124961

I am getting the following

An unhandled exception of type 'Sybase.DataWindow.MethodFailureException'
occurred in datawindow.dll
Additional information: Retrieve did not complete successfully, return code
is : -1

When I mess up the arguments to a datawindow. The datastore is suppose to
take a number and I passed a null object to the retrieve.

object[] args = null

some method...
ds.Retreive(args)

Is this a safe exception to be catching ? It sounds kinda vague in the
documentation and I don't want to be assuming all the time that the problem
is just the retrieve. In this error I would just catch it and return -1.
Am I going to get in to trouble doing this?

thx

jack


Roy Kiesler [TeamSybase] Posted on 2004-10-17 21:10:34.0Z
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.datawindow.net
Subject: Re: MethodFailureException
References: <416ebd14$1@forums-1-dub>
In-Reply-To: <416ebd14$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: c-24-4-133-16.client.comcast.net
X-Original-NNTP-Posting-Host: c-24-4-133-16.client.comcast.net
Message-ID: <4172dfca$1@forums-1-dub>
Date: 17 Oct 2004 14:10:34 -0700
X-Trace: forums-1-dub 1098047434 24.4.133.16 (17 Oct 2004 14:10:34 -0700)
X-Original-Trace: 17 Oct 2004 14:10:34 -0700, c-24-4-133-16.client.comcast.net
Lines: 33
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:553
Article PK: 124977

You should check the arguments _before_ you call Retrieve() and throw a
System.ArgumentNullException if needed.

--
Roy

Jack Addington wrote:
> I am getting the following
>
> An unhandled exception of type 'Sybase.DataWindow.MethodFailureException'
> occurred in datawindow.dll
> Additional information: Retrieve did not complete successfully, return code
> is : -1
>
> When I mess up the arguments to a datawindow. The datastore is suppose to
> take a number and I passed a null object to the retrieve.
>
> object[] args = null
>
> some method...
> ds.Retreive(args)
>
> Is this a safe exception to be catching ? It sounds kinda vague in the
> documentation and I don't want to be assuming all the time that the problem
> is just the retrieve. In this error I would just catch it and return -1.
> Am I going to get in to trouble doing this?
>
> thx
>
> jack
>
>