Problem with ora_login function in oraperl
Nalina
created: 2006-05-04 02:52:38
Hi monks
In our application we are using oraperl to aceess oracle. ora_login function is being called many times. I tried to print the return value of this function each time it is called. It looks something like this.
DBI::db=HASH(0x4034ddc8)
DBI::db=HASH(0x4034ddc8)
DBI::db=HASH(0x4034ddc8)
DBI::db=HASH(0x4034ddc8)
DBI::db=HASH(0x4034ddc8)
DBI::db=HASH(0x40239258)
The last return value is different from previous values. And also data fetched in this last instance(i.e. when the return value is DBI::db=HASH(0x40239258)) is not the data in the database.
What could be the problem?
Thanks in advance
Re: Problem with ora_login function in oraperl
created: 2006-05-04 03:18:28
The Result you are getting is a hash ref. So Use Dumper method of Data::Dumper instead of print to see what the hash contains.
Re: Problem with ora_login function in oraperl
created: 2006-05-04 03:37:51
oraperl is old and deprecated. If this is for a new project you should have a look at DBI and DBD::Oracle.


holli, /regexed monk/
Re: Problem with ora_login function in oraperl
created: 2006-05-05 00:28:20
My first guess would be that the connection parameters are different for that last call to ora_login, and you are connecting to some different database (which somehow happens to have the same table schema as the database used in the first several calls).

Maybe you have "development" and "production" versions of the database (or "legacy" and "current" servers)? And maybe the script originally used one of them, then was edited to use the other -- but one of the login calls was missed by the edit?

You should have the connection parameters specified once for the whole application, perhaps in a separate module, so that if you need to change anything (host name, password, etc), you only need to update one data structure in one piece of code.

perlmonks.org content © perlmonks.org and graff, holli, Nalina, perl_lover

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03