osfameron has asked for the wisdom of the Perl Monks concerning the following question:
I don't Win32::ODBC well enough - am I making a stupid mistake with my coding, or is there a known problem connecting to Remedy AR system using this module? I can connect (as proved by the fact that I can get a list of the columns in a particular table) but I can't get any information from them at all. I've tried to intersperse the code with various of the debugging functions suggested in the perldocs.
#!perl use strict; use Win32::ODBC; use Data::Dumper; my $odbc=Win32::ODBC->new('Remedy ODBC Data Source') or die "Couldn't +connect! $!"; my %sources=Win32::ODBC->DataSources (); print Dumper(\%sources); # $VAR1 = {}; my %drivers=Win32::ODBC->Drivers (); print Dumper(\%drivers); # This exists on the other hand... (large hash with details of availab +le drivers) my %funcs=$odbc->GetFunctions (); print Dumper(\%funcs); # $VAR1 = { # '0' => '0', # '1' => '0' # }; print "Running SQL statement:\n"; # $odbc->Run( q(SELECT * FROM "SHR:PeopleGroup")); # Excecuting connection 1 # sql statement: "SELECT * FROM "SHR:PeopleGroup"" # Error: "" # -------------------- $odbc->Sql( q(SELECT * FROM "SHR:PeopleGroup")); $odbc->DumpData (); # Produces a Heading row including all headings in the SHR:PeopleGroup + schema, # but with *no* data: for example- # Full-Name First-Name Last-Name ID Phone # --------- ---------- --------- -- ----- while ($odbc->FetchRow) { print "."; # Never gets here my %hash=$odbc->DataHash; print Dumper(\%hash); } print $odbc->TableList('','','',''); # print $odbc->TableList(); # print $odbc->TableList('','','','TABLE'); # All do nothing $odbc->ShutDown; # gives no useful information $odbc->Close;
Cheerio!
Osfameron
http://osfameron.perlmonk.org/chickenman/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::ODBC - connecting to Remedy AR System
by strat (Canon) on Jun 19, 2002 at 11:15 UTC | |
|
Re: Win32::ODBC - connecting to Remedy AR System
by gav^ (Curate) on Jun 19, 2002 at 14:12 UTC | |
by osfameron (Hermit) on Jun 19, 2002 at 14:31 UTC | |
by LostS (Friar) on Jan 23, 2003 at 17:20 UTC |