Jeff Zucker wrote:
> 
> Hi Steffen,
> 
> I've used your fine scripts to create and test $dbh->get_info() via
> DBD::CSV.  It works great.  I've noticed two minor discrepencies between
> the documentation I have and the way the script operates.
> 
> The order of options for SQL_SQL92_PREDICATES and for
> SQL_STRING_FUNCTIONS (not SQL92_STRING...) are different in your Local
> directory than they are in the MSDN ODBC docs.  This leads to
> discrepencies when building the bitmasks.  Please check out both of
> those out here or at the MSDN url it points to:

Do you mean the order in the output of GetInfoAll.pl? E.g.:

  SQL_FN_STR_CONCAT | SQL_FN_STR_LEFT | SQL_FN_STR_LTRIM ...

I hope, at least the values are correct. The #defines's from sqlext.h
are implemented as hash:

  $ReturnValues{SQL_STRING_FUNCTIONS} =
  {
    SQL_FN_STR_CONCAT                         => 0x00000001
  , SQL_FN_STR_INSERT                         => 0x00000002
  , SQL_FN_STR_LEFT                           => 0x00000004
  , SQL_FN_STR_LTRIM                          => 0x00000008
  , ...

Thus, there is no particular order. However, GetInfoAll.pl uses
Local::SQL::CLI::Const::GetInfo::Explain, which reverses the hash
and sorts by key:

  my %h = reverse %{$ReturnValues{$InfoType}};
  ...
  for my $k ( sort { $a <=> $b } keys %h )

Should I sort by value, i.e. by key of $ReturnValues{...} ?


Steffen

Reply via email to