Menu

#36 Make named pipe path configurable

open
momo
None
7
2013-10-15
2005-09-07
No

Currently the named pipe path is hard-coded to
/sql/query (even for Sybase). It should be
configurable, and Sybase should default to
/sybase/query (which is actually available in
DefaultProperties.NAMED_PIPE_PATH_SYBASE).

There are two implementations I've considered:

  1. Multiplex the "namedPipe" parameter to accept "true"
    (which defaults to the correct path for the given
    server: SQL Server or Sybase), "false" (the correct
    path would be defaulted, but not used) or the path of
    the named pipe starting with "/" or "\" (which would
    also imply "namedPipe=true").

  2. Provide a separate "namedPipePath" parameter just
    for setting the path, which would set "namedPipe=true"
    implicitly.

I like Item 1 because it prevents Yet Another
Configuration Parameter from being introduced to the
jTDS driver.

I like Item 2 because it doesn't overload the
"namedPipe" parameter to be Boolean/String.

Regardless of the external configuration, internally
both "namedPipe" and "namedPipePath" parameters will be
used to differentiate the two values.

Comments?

Note that I do NOT like the way the aveConnect driver
sets the path by providing the path after the hostname,
replacing the database name.

Discussion

  • David D. Kilzer

    David D. Kilzer - 2005-09-07

    Logged In: YES
    user_id=84089

    FWIW, I'm leaning towards multiplexing the "namedPipe"
    parameter.

     
  • David D. Kilzer

    David D. Kilzer - 2005-12-22

    Logged In: YES
    user_id=84089

    I just fixed the default named pipe path for Sybase in CVS.
    See comments from 22 Dec, 2005 in the CHANGELOG for details.

     
  • Alin Sinpalean

    Alin Sinpalean - 2005-12-23

    Logged In: YES
    user_id=564978

    Dave,

    My choice would also be approach 1. I think it wouldn't
    confuse users, while keeping compatible with existing URLs
    (not that approach 2 wouldn't).

    Alin.

     
  • momo

    momo - 2009-08-07

    I'd also vode for the first apprach. It's not too hard to implement so I'll just do what you suggested.

     
  • blee

    blee - 2013-10-15

    So, I've been attempting to use JTDS with SQL Server 2012's localDB implementation, which would require the use of a specific namedPipe that doesn't conform to the defaults and changes at each start-up. I've implemented the feature as described in option 1 and attached the source below. Would you kindly review and commit if possible?

    Thanks,
    Ben

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.