Ask a Question related to PERL Modules, Design and Development.
-
walt #1
Error in DBD::Chart (called from DBIx::Chart)
I'm receiving this error message when I run a PERL script:
Use of uninitialized value in string ne at
C:/Perl/site/lib/DBD/Chart.pm line 2491.
Why does this fail? or give me this error? What does it want to be
initialized?
What is DBD:Chart want me to do in DBIx::Chart?
This is the script used to create a composite of 2 line graphs on to
one "image":
#!C:\Perl\bin\perl.exe -w
use DBIx::Chart;
use DBI qw(:sql_types);
$DSN = 'Testing';
$DATA_SOURCE = "DBI:ODBC:$DSN";
$USER_NAME = 'sa';
$PASSWORD = 'xxxxx';
$DB = 'test';
$dbh = DBIx::Chart->connect($DATA_SOURCE, $USER_NAME, $PASSWORD,
{RaiseError => 1, AutoCommit => 0})
or die "Cannot connect to $DATA_SOURCE: $DBI::errstr \n";
DBI->trace(2, 'logfile.log');
$sql = qq( select * from
(select (rtrim(PCBJOBNUMBER)+', '+ rtrim(PCBPNUM)+', '+
rtrim(LLJC_Line_Number_LONG)+', '+ rtrim(PCBTASKNUM)) as job_task,
cast(PCBESTIMATEQTY as integer) as esthrs
from $DB..pcb00125
where pcbjobnumber = 'm0603412' and pcbpnum = '001'
returning linegraph(*)
where color = 'blue' and shape = 'fillcircle') as line1,
(select (rtrim(PCBJOBNUMBER)+', '+ rtrim(PCBPNUM)+', '+
rtrim(LLJC_Line_Number_LONG)+', '+ rtrim(PCBTASKNUM)) as job_task,
cast(PCBACTUALQTY as integer) as acthrs
from $DB..pcb00125
where pcbjobnumber = 'm0603412' and pcbpnum = '001'
returning linegraph(*)
where color = 'green' and shape = 'opensquare') as line2
returning image
where width = 600 and height = 500
and x_axis = 'Tasks'
and y_axis = 'Hours'
and keeporigin = 1
and showvalues = 1
and showpoints = 1
and showgrid = 0
and format = 'png'
and maptype = 'HTML'
and mapname = 'plot'
);
$rsth = $dbh->prepare($sql);
$rsth->execute;
$row = $rsth->fetchrow_arrayref;
# output picture
open(OUTF, '>graph.png');
binmode OUTF;
print OUTF $$row[0];
close OUTF;
$rsth->finish;
$dbh->disconnect;
As a side note I ran this script and it produced an output just fine:
#!C:\Perl\bin\perl.exe -w
use DBIx::Chart;
use DBI qw(:sql_types);
$DSN = 'Testing';
$DATA_SOURCE = "DBI:ODBC:$DSN";
$USER_NAME = 'sa';
$PASSWORD = 'xxxxx';
$DB = 'test';
$dbh = DBIx::Chart->connect($DATA_SOURCE, $USER_NAME, $PASSWORD,
{RaiseError => 1, AutoCommit => 0})
or die "Cannot connect to $DATA_SOURCE: $DBI::errstr \n";
$sql = qq( select USRTAB09, count(*)as shop_count
from $DB..PCB00175
where PCBJOBNUMBER not like 'S%' and PCBJS != 'Closed'
group by USRTAB09
order by shop_count desc
returning linegraph(*)
where width = 1200 and height = 800
and x_axis='Tasks'
and y_axis='Count'
and keeporigin = 1
and showpoints = 1
and format = 'png'
and maptype = 'HTML'
and mapname = 'plot'
);
$rsth = $dbh->prepare($sql);
$rsth->execute;
$row = $rsth->fetchrow_arrayref;
# output picture
open(OUTF, '>graph.png');
binmode OUTF;
print OUTF $$row[0];
close OUTF;
$dbh->disconnect;
Thanks for any help,
Walt (warsting@gmail.com)
walt Guest
-
stacked Bar chart/Line chart hybrid- Charting
Hi all, I have a requirement to have a stacked bar graph, with a line graph on the same chart. Has anyone here done this before? Apparently there... -
Refreshing chart data doesnt update chart
I must be missing something simple here. I have a column chart that is using an array for its dataprovider. However, when I update the underlying... -
Chart
Hi, First I apologize for my english. I am using MySQL and PHP. I have a list of Tasks in a table. Each Task has a status... -
DBIx::Chart running out of cursors in Oracle
I've done a bunch of web searched for DBIx::Chart and haven't found anything too usefull to me. I have just enough of a clue to be dangerous, but... -
DBD::Chart: DBI->connect fails "DBD/Chart.pm did not return a true value"
Hello Group! I've got a problem with DBD::Chart (0.80). When I try to execute the following script: #!/usr/bin/perl -W use DBI; my $dbh =... -
Dean Arnold #2
Re: Error in DBD::Chart (called from DBIx::Chart)
walt wrote:
Could you provide the versions of DBIx::Chart and> I'm receiving this error message when I run a PERL script:
> Use of uninitialized value in string ne at
> C:/Perl/site/lib/DBD/Chart.pm line 2491.
>
> Why does this fail? or give me this error? What does it want to be
> initialized?
> What is DBD:Chart want me to do in DBIx::Chart?
>
>
> This is the script used to create a composite of 2 line graphs on to
> one "image":
>
> #!C:\Perl\bin\perl.exe -w
>
> use DBIx::Chart;
> use DBI qw(:sql_types);
>
> $DSN = 'Testing';
> $DATA_SOURCE = "DBI:ODBC:$DSN";
> $USER_NAME = 'sa';
> $PASSWORD = 'xxxxx';
> $DB = 'test';
> $dbh = DBIx::Chart->connect($DATA_SOURCE, $USER_NAME, $PASSWORD,
> {RaiseError => 1, AutoCommit => 0})
> or die "Cannot connect to $DATA_SOURCE: $DBI::errstr \n";
> DBI->trace(2, 'logfile.log');
>
> $sql = qq( select * from
>
> (select (rtrim(PCBJOBNUMBER)+', '+ rtrim(PCBPNUM)+', '+
> rtrim(LLJC_Line_Number_LONG)+', '+ rtrim(PCBTASKNUM)) as job_task,
> cast(PCBESTIMATEQTY as integer) as esthrs
> from $DB..pcb00125
> where pcbjobnumber = 'm0603412' and pcbpnum = '001'
> returning linegraph(*)
> where color = 'blue' and shape = 'fillcircle') as line1,
>
> (select (rtrim(PCBJOBNUMBER)+', '+ rtrim(PCBPNUM)+', '+
> rtrim(LLJC_Line_Number_LONG)+', '+ rtrim(PCBTASKNUM)) as job_task,
> cast(PCBACTUALQTY as integer) as acthrs
> from $DB..pcb00125
> where pcbjobnumber = 'm0603412' and pcbpnum = '001'
> returning linegraph(*)
> where color = 'green' and shape = 'opensquare') as line2
>
> returning image
> where width = 600 and height = 500
> and x_axis = 'Tasks'
> and y_axis = 'Hours'
> and keeporigin = 1
> and showvalues = 1
> and showpoints = 1
> and showgrid = 0
> and format = 'png'
> and maptype = 'HTML'
> and mapname = 'plot'
> );
> $rsth = $dbh->prepare($sql);
> $rsth->execute;
> $row = $rsth->fetchrow_arrayref;
>
> # output picture
> open(OUTF, '>graph.png');
> binmode OUTF;
> print OUTF $$row[0];
> close OUTF;
>
> $rsth->finish;
> $dbh->disconnect;
>
DBD::Chart you're using ? Also, at which line of your
script does it break ? prepare(), execute(), or fetch() ?
Once I know which version you're using, I may be able
to pinpoint the problem.
Regards,
Dean Arnold
Presicient Corp.
Dean Arnold Guest
-
Dean Arnold #3
Re: Error in DBD::Chart (called from DBIx::Chart)
walt wrote:
Ooops, I think I may have spotted the issue. IIRC, DBIx::Chart doesn't> I'm receiving this error message when I run a PERL script:
> Use of uninitialized value in string ne at
> C:/Perl/site/lib/DBD/Chart.pm line 2491.
>
> Why does this fail? or give me this error? What does it want to be
> initialized?
> What is DBD:Chart want me to do in DBIx::Chart?
>
>
> This is the script used to create a composite of 2 line graphs on to
> one "image":
>
> #!C:\Perl\bin\perl.exe -w
>
> use DBIx::Chart;
> use DBI qw(:sql_types);
>
> $DSN = 'Testing';
> $DATA_SOURCE = "DBI:ODBC:$DSN";
> $USER_NAME = 'sa';
> $PASSWORD = 'xxxxx';
> $DB = 'test';
> $dbh = DBIx::Chart->connect($DATA_SOURCE, $USER_NAME, $PASSWORD,
> {RaiseError => 1, AutoCommit => 0})
> or die "Cannot connect to $DATA_SOURCE: $DBI::errstr \n";
> DBI->trace(2, 'logfile.log');
>
> $sql = qq( select * from
>
> (select (rtrim(PCBJOBNUMBER)+', '+ rtrim(PCBPNUM)+', '+
> rtrim(LLJC_Line_Number_LONG)+', '+ rtrim(PCBTASKNUM)) as job_task,
> cast(PCBESTIMATEQTY as integer) as esthrs
> from $DB..pcb00125
> where pcbjobnumber = 'm0603412' and pcbpnum = '001'
> returning linegraph(*)
> where color = 'blue' and shape = 'fillcircle') as line1,
>
> (select (rtrim(PCBJOBNUMBER)+', '+ rtrim(PCBPNUM)+', '+
> rtrim(LLJC_Line_Number_LONG)+', '+ rtrim(PCBTASKNUM)) as job_task,
> cast(PCBACTUALQTY as integer) as acthrs
> from $DB..pcb00125
> where pcbjobnumber = 'm0603412' and pcbpnum = '001'
> returning linegraph(*)
> where color = 'green' and shape = 'opensquare') as line2
support the 'AS' keyword for subquery aliases; so instead of
....and...> where color = 'blue' and shape = 'fillcircle') as line1,you'll need to change to> where color = 'green' and shape = 'opensquare') as line2
....and...> where color = 'blue' and shape = 'fillcircle') line1,HTH,> where color = 'green' and shape = 'opensquare') line2
Dean Arnold
Presicient Corp.
Dean Arnold Guest
-
Peter Scott #4
Re: Error in DBD::Chart (called from DBIx::Chart)
On Fri, 19 May 2006 11:35:05 -0700, walt wrote:
Incidentally, that's a warning, not an exception, and your program did not> I'm receiving this error message when I run a PERL script:
> Use of uninitialized value in string ne at
> C:/Perl/site/lib/DBD/Chart.pm line 2491.
>
> Why does this fail? or give me this error?
stop executing at that point. It may have produced incorrect results, no
results at all, or thrown an actual exception later, for reasons stemming
from an uninitialized value being used, but that's a separate issue.
--
Peter Scott
[url]http://www.perlmedic.com/[/url]
[url]http://www.perldebugged.com/[/url]
Peter Scott Guest



Reply With Quote

