in reply to Re: Perl DBI Informix
in thread Perl DBI Informix

I Did set INFORMIXDIR and now I am with another problem, C:\perlJunk>perl DBItestdb.pl DBI connect('testdb','',...) failed: SQL: -25596: <<Failed to locate SQL error m essage> at DBItestdb.pl line 11 Can't call method "prepare" on an undefined value at DBItestdb.pl line 13. Any Idea?Please Cheers

Replies are listed 'Best First'.
Re^3: Perl DBI Informix
by Marshall (Canon) on Aug 24, 2009 at 06:48 UTC
    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.

Re^3: Perl DBI Informix
by weismat (Friar) on Nov 17, 2009 at 08:30 UTC
    Two potential problems:
    Is testdb really installed?
    Could it be the stores db?
    I would use dbacces or something similar to check the SQL first.