in reply to Re: Querying eDOCS SearchServer Full-Text Search Engine From Perl
in thread Querying eDOCS SearchServer Full-Text Search Engine From Perl
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):
(The nl and db commands are handy MKS Toolkit utilities.)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:\>
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.
|
|---|