Re: Error in DBD::Chart (called from DBIx::Chart)



walt wrote:
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

Ooops, I think I may have spotted the issue. IIRC, DBIx::Chart doesn't
support the 'AS' keyword for subquery aliases; so instead of


> where color = 'blue' and shape = 'fillcircle') as line1,
....and...
> where color = 'green' and shape = 'opensquare') as line2

you'll need to change to

> where color = 'blue' and shape = 'fillcircle') line1,
....and...
> where color = 'green' and shape = 'opensquare') line2

HTH,
Dean Arnold
Presicient Corp.
.



Relevant Pages

  • Re: Third times a charm? Date query question
    ... field is it a date field or text field that contains a string that looks ... Those both should fail as the appear to be incorrectly bracketed. ... I keep getting an error stating this expression ... How can I fix this and will the code work if fixed? ...
    (microsoft.public.access.queries)
  • Re: Dynamicly Added Range Validator Acting Goofy
    ... noticed that the range validator doesn't fail in all cases when it should. ... ColName As String, ByVal pl_hold As PlaceHolder, Optional ByVal minvalue As ... ElseIf maxvalue = -1 Then ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Third times a charm? Date query question
    ... field is it a date field or text field that contains a string that looks ... Those both should fail as the appear to be incorrectly bracketed. ... I keep getting an error stating this expression ... How can I fix this and will the code work if fixed? ...
    (microsoft.public.access.queries)
  • Re: BJC HLCB thread
    ... The Renegade with Aaron ... Gregg running it. ... Low - The prick with the string and the card tricks. ... Goal - Go to a workshop - fail. ...
    (rec.juggling)
  • Re: basic char and int array loading
    ... >will try to convert that input to a number and fail. ... in the stream's buffer now makes things understandable. ... is string or numeric. ... way in C++, to load an array with a combination of strings and numerics, ...
    (alt.comp.lang.learn.c-cpp)