Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Perl DBI issue

by Win (Novice)
on Mar 12, 2007 at 11:50 UTC ( [id://604324]=perlquestion: print w/replies, xml ) Need Help??

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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Perl DBI issue
by davorg (Chancellor) on Mar 12, 2007 at 11:58 UTC

    You probably don't want to contact the DBI developers. You probably want to contact the developers of the DBD module that you are using.

    Of course, it's always possible that if you read the documentation for your DBD module then you'd find out that they already know about this alleged limitation.

    Update: As others have pointed out, the documentation for DBD::Sybase (a likely candidate for the DBD that you are using) says this:

    In particular ?-style placeholders are not supported

    Yet another example of Win's inability to read documentation.

Re: Perl DBI issue
by derby (Abbot) on Mar 12, 2007 at 12:44 UTC

    You don't say which DBD driver you use. Can I assume it's DBD::Sybase? If so, there's a note in the documentation that says place holders are not supported when connecting to an MS SQL Server. The author and maintainer of DBD::Sybase, mpeppler, does use the monastery regularly - I would expect a note from him to show up later. Or you could check his mailing list archive.

    -derby
      The OP appears to be using DBD::ODBC and freetds. Placeholders have better support in that combination than DBD::Sybase/FreeTDS (AFAIK), but in any case the underlying API needs to support the placeholders when calling stored procedures, and the only way to check that is with FreeTDS's ODBC implementation.

      Michael

Re: Perl DBI issue
by talexb (Chancellor) on Mar 12, 2007 at 14:32 UTC

    You may not have caught on to what DBI really is. It's a uniform interface to any number of database specific modules. There is one DBI, and many DBD modules. There is even a template DBD called DBI::DBD, in case you come across a database for which a DBD doesn't exist, and you'd like to be able to access it through DBI.

    If you look at the DBI documentation, the Description section starts with the following:

      The DBI is a database access module for the Perl programming language. It defines a set of methods, variables, and conventions that provide a consistent database interface, independent of the actual database being used.

    Even before that, there's the following suggestion:

      Before asking any questions, reread this document, consult the archives and read the DBI FAQ. The archives are listed at the end of this document and on the DBI home page. An FAQ is installed as a DBI::FAQ module so you can read it by executing perldoc DBI::FAQ. However the DBI::FAQ module is currently (2004) outdated relative to the online FAQ on the DBI home page.

    Clear?

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: Perl DBI issue
by imp (Priest) on Mar 12, 2007 at 15:16 UTC
    You can use placeholders with DBI and SQL2000, but only in certain configurations. If you are running this code on windows then I believe DBD::ODBC will allow placeholders - but my memory is rusty. If running on a unix system then you can also use DBD::ODBC with freetds and iodbc
Re: Perl DBI issue
by Jenda (Abbot) on Mar 12, 2007 at 22:05 UTC
    1. Show us the code!
    2. Tell us what modules do you use to connect to the database and their versions (DBI, DBD::ODBC / DBD::Sybase).
    3. Tell us what operating system do you use and what version of MS SQL Server.

    And please don't be so quick. Even though the modules are not (and cannot be) 100% perfect it's still more likely there is a problem in your code than in the tried and tested modules.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Perl DBI issue
by monkey_boy (Priest) on Mar 12, 2007 at 11:55 UTC
    I would generally email them, how do you usually contact people?


    This is not a Signature...
Re: Perl DBI issue
by andye (Curate) on Mar 12, 2007 at 12:29 UTC
    I don't understand why people are downvoting this node, it seems to me that Win is being conscientious in wanting to make a bug report in the most appropriate way, and not trouble the wrong person with it. Good for him/her.

      Considering that it says it doesn't work right in the documentation for the most likely candidate DBD module in a section entitled "Using DBD::Sybase with MS-SQL" it's a pretty inane question (but then it's from Win so that's pretty much a given; then again were it not a documented limitation of the module in question it is at least a Perl question, so I guess that's more progress still).

      A reply falls below the community's threshold of quality. You may see it by logging in.
      I don't understand why people are downvoting this node, it seems to me that Win is being conscientious in wanting to make a bug report in the most appropriate way, and not trouble the wrong person with it. Good for him/her.

      Knowing Win's previous history of refusing to follow the advices he asked for and got, and in particular his refusal to read the obvious documentation, let alone the very poor programming skills with severe lackings on Perl basics, I suspect people would reasonably like at least to see a minimal but complete and well written example exhibiting the problem, complete of relevant error messages or logs, and a pointer to the documentation showing that the limitation (rather than a bug) is not already known to the authors.

        ...people would reasonably like at least to see a minimal but complete and well written example exhibiting the problem, complete of relevant error messages or logs...

        I disagree. The question was not "This isn't working; what am I doing wrong?" it was "I've found a bug; how do I alert the maintainers?" Posting code is not appropriate in such a case. Of course, it could have been an XY Problem, but jumping to the conclusion that it was is not justified.

        I think Win's question was entirely appropriate. Sure, the answer involved a lot of "RTFM" and other LART brandishing... but then, most SoPWs do.

        A word spoken in Mind will reach its own level, in the objective world, by its own weight
        very poor programming skills with severe lackings on Perl basics

        Well, I've looked through Win's previous nodes and you may have a point there. On the other hand, some of Win's previous nodes are perfectly reasonable. The main problem seems to be with understanding the application of answers, and learning to do independent research. These are learnt skills, complete beginners don't have them to start with.

        My central point is: Isn't the point of SoPW to provide advice and answers to questions, for people who don't actually know the answers already?

        If Win already had the skills and knowledge to create a decent test case and report a bug, why would (s)he need to ask the question?

        In this case, it seems to me that what Win is asking could be re-phrased as: "When is it appropriate for me to report a bug in a Perl module, and how do I do it?"

        I guess a useful answer to that could cover:

        • Read the docs first
        • Try to find out if anyone else has had the same problem
        • Create a minimal example that shows the problem
        • How to contact the authors
        and the monastery has pretty much covered all of these points in different people's responses, which is great.

        I felt motivated to post because Win seemed to be getting a bunch of "use email, you duffer!", "use Google, you duffer!" type responses, whereas I think that the question of when and how to submit a bug report for a Perl module is a perfectly valid one, and utterly appropriate for the Monastery.

        Just my printf "USD%0.2f", 2/100. If the OP's been wasting monks' time and frustrating them with help vampire requests, there's no obligation on anyone to respond to him/her.

        With best wishes to all, andye

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://604324]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-28 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found