Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Querying eDOCS SearchServer Full-Text Search Engine From Perl

by pilcrow (Sexton)
on Jan 14, 2008 at 00:53 UTC ( [id://662235]=note: print w/replies, xml ) Need Help??


in reply to Querying eDOCS SearchServer Full-Text Search Engine From Perl

I'm able to access SearchServer tables via ODBC using Win32::ODBC, but I would prefer to use the DBI.

On this point, how about trying DBD::ODBC?

  • Comment on Re: Querying eDOCS SearchServer Full-Text Search Engine From Perl

Replies are listed 'Best First'.
Re^2: Querying eDOCS SearchServer Full-Text Search Engine From Perl
by roboticus (Chancellor) on Jan 14, 2008 at 02:49 UTC
    Seconded! I normally use DBD::ODBC as my first choice for chatting with databases. Some claim that it's not very efficient, but I find it quite adequate.

    ...roboticus

      But isn't it too slow and doesn't it have too much conceptual overlap with DBI to be the first choice?
        fenLisesi:

        I always access DBD::ODBC through DBI. (I don't know how to talk to it directly.) While some claim that ODBC is "slow", I've not found it to be slow for the standard SQL statements I use.

        I'm sure that it's probably significantly slower than other DBI backends for some workloads and or databases, but I haven't run across it yet.

        I tend to use it for simple DDL and DML manipulations with small tables (less than 10 million rows).

        ...roboticus

        Not sure about the speed, but I don't understand your second comment. DBD::ODBC is a DBD driver meant to be used with DBI. Did you mean that Win32::ODBC has too much conceptual overlap with DBI?
Re^2: Querying eDOCS SearchServer Full-Text Search Engine From Perl
by Jim (Curate) on Jan 14, 2008 at 19:08 UTC
    On this point, how about trying DBD::ODBC?

    Oops! Sorry. The important point I intended to make in my original post (but didn't) is that I did, indeed, try DBD::ODBC first and discovered it doesn't work with the SearchServer 5.3 ODBC driver. Apparently, SearchServer only supports ODBC 1.0. Crazy, huh?

    Here's a little test script that demonstrates the issue (I think):

    C:\>nl -ba -w 2 -s " " dbd-odbc.pl 1 #!C:/Perl/bin/perl.exe 2 3 use strict; 4 use warnings; 5 use DBI; 6 7 @ARGV == 2 or die "Usage: perl $0 <DSN> <ODBC Version>\n"; 8 9 my $dsn = shift; 10 my $ver = shift; 11 12 my $dbh = DBI->connect("dbi:ODBC:$dsn", undef, undef, { 13 PrintError => 0, 14 RaiseError => 1, 15 odbc_version => $ver, 16 }); 17 18 $dbh->disconnect; 19 20 exit 0; 21 22 __END__ C:\>db -d TESTDSN "SELECT COUNT(*) FROM TABLES" COUNT(*) 445 C:\>perl dbd-odbc.pl TESTDSN 1 DBI connect('TESTDSN','',...) failed: [Microsoft][ODBC Driver Manager] + Invalid argument value (SQL-HY024)(DBD: db_login/SQLSetEnvAttr err=- +1) at dbd-odbc.pl line 12 C:\>perl dbd-odbc.pl TESTDSN 2 DBI connect('TESTDSN','',...) failed: [Hummingbird][SearchServer]Drive +r not capable (SQL-S1C00)(DBD: dbd_db_login/SQLSetConnectOption err=- +1) at dbd-odbc.pl line 12 C:\>perl dbd-odbc.pl TESTDSN 3 DBI connect('TESTDSN','',...) failed: [Hummingbird][SearchServer]Drive +r not capable (SQL-HYC00)(DBD: dbd_db_login/SQLSetConnectOption err=- +1) at dbd-odbc.pl line 12 C:\>
    (The nl and db commands are handy MKS Toolkit utilities.)

    This was the motive for my inquiry. I'm wondering if anyone has used Perl with SearchServer and, in particular, managed to access SearchServer tables via ODBC using either Win32::ODBC or DBD::ODBC.

    Jim

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-16 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found