in reply to Re: ENV Object?
in thread ENV Object?

I am using Sybase::Ctlib on SunOS 5.6.It's a corporate machine so I can't touch the CONFIG file or the CTlib.pm file. I am using your documentation for my calls.I set my first statement (after defining the perl path ) to BEGIN{$ENV{SYBASE}='/sybase';}and it worked. I have another question which you would be the best person to answer since sybhelp is telling me that it can't load .CTlibHelptextMsgs (and I can only find *TextMsgs files for desedit_dce,sqlupgrade,sqlloc,srvbuild and sybsetup). I am getting the following error:

Open Client Message: Message number: Layer=(1) ORIGIN=(1) SEVERITY=(1) NUMBER=(159)
Message String: ct_cmd_drop():user api layer: external error: This routine can be called only if the command structure is idle.

I can not find any documentation on ct_cmd_drop(). What type of logic error should I be looking for in my code?

Replies are listed 'Best First'.
Re: Re: Re: ENV Object?
by mpeppler (Vicar) on Oct 30, 2001 at 21:35 UTC
    ct_cmd_drop is usually only called when you close your connection (i.e. when the database handle is destroyed). The error message means that when ct_cmd_drop() was called there were still results pending, which usually points to an incorrect fetch loop in your code.

    So I suggest that you take a look at your code and make sure that you process all the data that is returned by the server, or that you call ct_cancel() if you want to throw the remainder of the results away.

    Michael

      Thanks.