470,594 Members | 1,680 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

Connecting with Perl to Oracle

I’m trying to connect with perl DBD::Oracle on Windows to Oracle DB (Linux).

I compiled the Oracle.dll using the commands “perl Makefile.pl” “nmake” and “nmake install”, but when I try to connect to the DB, I get the following runtime error:

“R6034 an application has made an attempt to load the C Runtime library incorrectly.
Please contact the applications’ support team for more information.”

I suspect that I mixed the versions of VC compiler/Linker, when creating the Oracle.dll.

Here are the important env variables:
Expand|Select|Wrap|Line Numbers
  1. INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
  2. LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft
  3.  Visual Studio 8\SDK\v2.0\lib;;C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
  4. LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
  5. Path=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;C:\Perl\bin\;C:\Perl\bin\;C:\Perl\site\bin;C:\Perl\bin;c:\Perl_ActiveState\site\bin;c:\Perl_ActiveState\bin;D:\oracle\product\10.2.0\client_1\bin;C:\Oracle9i\bin;C:\Orant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\TELSTRA\Utils;c:\Program Files\Rational\common;C:\Program Files\IBM\Installation Manager\eclipse\lib;C:\Program Files\OpenVPN\bin
here is my code:

Expand|Select|Wrap|Line Numbers
  1. use DBI qw(:sql_types);
  2.  use DBD::Oracle;
  4.  my $DB_Username     = "xxxx";
  5.  my $DB_Password     = "xxxxx";
  6.  my $DB_Type         = "";
  7.  my $DB_Handle       = "";
  8.  my $DB_Host         = "";
  9.  my $DB_Sid          = "DBSID";
  10.  my $DB_DSN          = "DBI:Oracle:RAMDB";
  12.   my $dbh = DBI->connect($DB_DSN, $DB_Username, $DB_Password) || die ("can't connect to DB \n");
Does anyone has a suggestion as to how to debug it , or fix it ?
Feb 27 '08 #1
1 2586
971 Expert 512MB
If you are on a windows machine and using ActiveState, you can use the PPM utility to install the DBD::Oracle module for you. Try that and see if it corrects your problems.

Also, please use Code tags when posting code here. Thank You.

Feb 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Keith | last post: by
2 posts views Thread by msnesw.microsoft.com | last post: by
2 posts views Thread by rcc.gamer | last post: by
4 posts views Thread by billb | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.