Alritey.

I've scoured the net all day for details in this problem. I've created a system DSN on the web server, which links to an Oracle database on another server. During the DSN setup, the connection tests successfully.

When I try to connect using odbc_connect, I get the following message:

Warning: SQL error: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed, SQL state IM004 in SQLConnect in.... etc.

I've read up on it, and found that YES my temp directory has write permissions for IUSR_, YES c:\oracle\ora92 has write permissions, YES I installed all the client tools as administrator. Other than that, I can't see any reason why this shouldn't be working. The syntax I'm using for odbc_connect is:

odbc_connect($dsn,$username,$password)

which works fine for ODBC data sources pointing at SQLServer2000 databases. Does ODBC for Oracle require cursor_type or a different method of passing dsn name/username/password?

any help ASAP!! would be appreciated.

    read here

    oracle does not use php's odbc connection...use native oracle connections

    read the [man]oracle[/man] here

      Haaaang on.....

      I've got ODBC data sources defined on my IIS box that link to an Oracle database, so I should be able to use the odbc functions to connect to that data source.... other people were having a similar problem to me, but their problem revolved around folder permissions..... when they overcame them, they were able to use odbc functions to connect to an oracle database defined as an System DSN on the web server. I know it's possible without having to resort to using native oracle functions (got a lot of code already written for odbc/sqlserver, not too keen on re-writing it all) and if I can just get past this first problem I know it'll work.

      I thought one of the main perks with ODBC was that it served as an abstraction layer..... being able to access several different types of databases using the same functions and methods in whatever language you were developing in.

        Write a Reply...