prafulltc has asked for the wisdom of the Perl Monks concerning the following question:

Hi All $dbh = new Sybase::DBlib [$user [, $pwd [, $server [, $appname , {additional attributes}]]]]
Why application name is required in Sybase::Dblib ? Prafull
  • Comment on why app name is required in Sybase::DBlib ?

Replies are listed 'Best First'.
Re: why app name is required in Sybase::DBlib ?
by JavaFan (Canon) on Oct 14, 2011 at 12:15 UTC
    Required? Doesn't [] mean optional?

    And it's part of Sybase::DBlib, because that's what the DBlib C-Client libraries support. You're required to use pass a pointer to a LOGINREC when using dbopen to establish a connection. The LOGINREC contains a mandatory DBSETLPWD (password) record, and optional DBSETLUSER (user), DBSETLHOST (host) and DBSETAPP (application) records.

    Sybase::DBlib::new does all the C stuff for you, but doesn't rob you of options. Hence, the optional $appname.

Re: why app name is required in Sybase::DBlib ?
by jfroebe (Parson) on Oct 14, 2011 at 19:21 UTC