This is good...you are listening and working on your own and making progress! That approach will generate lots of help on Monk's!

I suspect that something is wrong in the connect.

my $dbh = DBI->connect("dbi:Informix:testdb");
I would think that the argument to "connect" should be a file name that is valid on Windows. I would also suspect that $dbh is "undefined".

See if you can find some "test DB" provided in the Informix package, then supply full path name to that to see if you can connect to it with a defined, non-zero $dbh. Update: or perhaps, just modify name to be "Informix.testdb".

Update: I'm not a super DB guru, but I do know that sometimes there are some steps that you have to go through to "get the db started", meaning that you can't just start with an "empty db file". To set up even a simple table with just say "date", "city" or whatever, the DB has to "learn" what "date" and "city" mean. As I said, I am not an Informix guy, but look in the documentation for how to get a DB started. There is probably a readable DB already set up as a demo that you can play with. I am guessing, but I suspect that this is true.


In reply to Re^3: Perl DBI Informix by Marshall
in thread Perl DBI Informix by Sun751

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.