Problem using DBI in Object Oriented Package
Hi, I'm trying to use the DBI within a package I'm writing, and am getting an odd error (warning). What is even more odd is that everything actually works fine. Here is what I am doing in the package: package Package; # class data my $Dbh; sub BEGIN { $Dbh = DBI-connect("DBI:mysql:database=mydb", {PrintError = 1, RaiseError = 0}) or croak "Cannot connect to mysql database: $DBI::errstr\n"; } sub END { $Dbh-disconnect() or croak "could not disconnect from database: $DBI::errstr"; } In between I run a routine which just dumps a list of tables in the database, so my script looks something like: use Package; Package-dumptables(); And I get a printout of the tables, which means it must be connecting ok. I don't get the croak message on the $Dbh-disconnect(), so that must also be working. But I am getting: Useless use of private variable in void context at Package.pm line 56. line 56 being the one that just contains: $Dbh-disconnect() so it must be saying $Dbh is being used in a void context. But if that were the case, surely the disconnect method call would fail with cannot call method on undefined object? Any help appreciated. Tom Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
SQL GetData
How can i use the DBI / DBD::Mysql Module with MSSQL and SQLGetData. Is there anything i have to take attention to? working with latest DBI,DBD and MS SQL 7 Thanx in advance, Helmut Ebelt
Re: Problem using DBI in Object Oriented Package
Don't use BEGIN or END as subroutine names since they have special meaning in Perl. BEGIN blocks are executed at compile time while END blocks are always executed at program termination (unless a kill signal or something similar is sent by the OS). Try using a different name for your subroutines... it might have something to do with that since I can't see anything glaring at me from the code snippet you have (of course it's 7a and I'm not thinking very clearly yet). --Curt On Tue, 10 Apr 2001, [iso-8859-1] Tom Robinson wrote: Hi, I'm trying to use the DBI within a package I'm writing, and am getting an odd error (warning). What is even more odd is that everything actually works fine. Here is what I am doing in the package: package Package; # class data my $Dbh; sub BEGIN { $Dbh = DBI-connect("DBI:mysql:database=mydb", {PrintError = 1, RaiseError = 0}) or croak "Cannot connect to mysql database: $DBI::errstr\n"; } sub END { $Dbh-disconnect() or croak "could not disconnect from database: $DBI::errstr"; } In between I run a routine which just dumps a list of tables in the database, so my script looks something like: use Package; Package-dumptables(); And I get a printout of the tables, which means it must be connecting ok. I don't get the croak message on the $Dbh-disconnect(), so that must also be working. But I am getting: Useless use of private variable in void context at Package.pm line 56. line 56 being the one that just contains: $Dbh-disconnect() so it must be saying $Dbh is being used in a void context. But if that were the case, surely the disconnect method call would fail with cannot call method on undefined object? Any help appreciated. Tom Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
Help Regarding Building DBI statically with perl
hi all, I'm trying to link DBI statically into perl(while building perl 5.6) as i'm disabiling the loadable module support from perl 5.6. To accomplish the above i placed DBI sources along with the sources of other default modules of perl. At first DBI didnot compile then i had to change the Makefile of DBI to look similar to the Makefile of the default modules of perl. When i did this DBI got built with perl but when i write a sample program i get the following error. "DBI object version 0.03 does not match $DBI::VERSION 1.14 at /usr/local/lib/perl 5/5.6.0/i686-linux-thread-multi-64all/DBI.pm line 180. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.6.0/i686-linux-threa d-multi-64all/DBI.pm line 182. Compilation failed in require at /home/ashok/perlscripts/test.pl line 2. BEGIN failed--compilation aborted at /home/ashok/perlscripts/test.pl line 2." what is the cause of the error. is it possible to complie DBI statically while perl is being built(i tried perl Makefile.PL LINKTYPE=static) . is there an alternate way of doing the above. i would be very greatful if you could help me by either sending me your valuable suggestions or by pointing out some sites. Tbanks in advance ashok __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Help Regarding Building DBI statically with perl
hi all, I'm trying to link DBI statically into perl(while building perl 5.6) as i'm disabiling the loadable module support from perl 5.6. To accomplish the above i placed DBI sources along with the sources of other default modules of perl. At first DBI didnot compile then i had to change the Makefile of DBI to look similar to the Makefile of the default modules of perl. When i did this DBI got built with perl but when i write a sample program i get the following error. "DBI object version 0.03 does not match $DBI::VERSION 1.14 at /usr/local/lib/perl 5/5.6.0/i686-linux-thread-multi-64all/DBI.pm line 180. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.6.0/i686-linux-threa d-multi-64all/DBI.pm line 182. Compilation failed in require at /home/ashok/perlscripts/test.pl line 2. BEGIN failed--compilation aborted at /home/ashok/perlscripts/test.pl line 2." what is the cause of the error. is it possible to complie DBI statically while perl is being built(i tried perl Makefile.PL LINKTYPE=static) . is there an alternate way of doing the above. i would be very greatful if you could help me by either sending me your valuable suggestions or by pointing out some sites. Tbanks in advance ashok __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Can't install DBI on WinNT - no make and PPM doesn't find DBI
Hi, I've fallen at the first hurdle while trying to install the DBI module. I've run Makefile.pl, however my system doesn't recognise the "make" command which the readme.txt states that I should run. I've also tried to install the package via PPM (ActivePerl v 617), however it can't find the DBI module or any other module. Any ideas? Thanks Chris Perl / SGML Developer e-access Public Record Office, Kew Richmond Surrey, TW9 4DU UK Tel: (0208) 392 5300 ext 2213 http://www.pro.gov.uk/ --- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.
Re: Problem using DBI in Object Oriented Package
On Tue, Apr 10, 2001 at 12:26:39PM +0100, Tom Robinson wrote: I'm trying to use the DBI within a package I'm writing, and am getting an odd error (warning). What is even more odd is that everything actually works fine. sub END { $Dbh-disconnect() or croak "could not disconnect from database: $DBI::errstr"; } And I get a printout of the tables, which means it must be connecting ok. I don't get the croak message on the $Dbh-disconnect(), so that must also be working. But I am getting: Useless use of private variable in void context at Package.pm line 56. line 56 being the one that just contains: $Dbh-disconnect() so it must be saying $Dbh is being used in a void context. But if that were the case, surely the disconnect method call would fail with cannot call method on undefined object? I suspect that the error is actually on another line. $Dbh on that line is not in a void context, because it is on the left-hand side of a method call. Ronald
Re: MSAccess DB Problem
Hi Thomas, So probably I can get a connection even when the DSNs are not shown ?? I mean if the implementation I have does not have that feature -listing - I maybe able to get a connection by following properly the sintaxis of the instruction no?? I am not using ActivePerl implementation, I am using the IndigoPerl one cause it comes with the Apache Web Server integrated. Regarding helping you I am still in nappies but If you indicate me where to start working I will be happy to give the community a hand. Best regards, Juan Antonio Celaya
General ?'s about DBD's and platforms
PSCI_1I am relatively new to Perl, primary experience through Windows NT with limited knowledge of UNIX. I have been instructed to identify a corporate standard version of Perl and upgrade our desktops and servers. For servers we have NT, HP/UX and SunSolaris. We run Oracle 7 8, and DB2 UDB. Is it naive of me to think that I can have one standard build of perl for the corporation? I was thinking of having one, with DBD's for all our databases included...meaning the DB2 DBD would be installed even on a server running only Oracle; it wouldn't be used it would just be there such that there was a standard configuration. Or should I have multiple configurations, one per OS platform and even perhaps DBMS? I saw in the dbi-archives warnings against mixing Oracle 7 8 implementations. Yet saw other items indicating users having both Oracle and Oracle8 DBD's installed. Can someone clarify this for me, can I have both versions of the Oracle DBD or do I have to match the Oracle client and/or DB level? Also, when looking at the ActiveState ActivePerl5.6 build 623 PPM packages, it appears that the DBD:Oracle is not available for Solaris and no mention of UNIX whatsoever. http://www.activestate.com/ASPN/Downloads/ActivePerl/PPM/Packages Should I be looking somewhere else (CPAN) instead? I've never done Make's before...and well you know, it's kind of a fear of the unknownok...I'm chicken :-) TIA Paula (a.k.a A fish out of water! :-) )
Perl and Oracle...Help??
I'm a newbie Perl programmer and I have been looking at the documentation for calling an Oracle package from Perl. From this and with the advice of others here, I wrote some code which I thought would do the trick. I think I'm close but it's just not quite there. Can anyone see what I'm doing wrong?? HELP? Here is my code... USE DBI; # Define the output FILE AND its path $outfile1 = "cursor_test_1.txt"; # Define the logon variables FOR AWASUN7 $INSTANCE = "database_name"; $username = "username"; $password = "password"; # OPEN a connection TO DBC DATABASE $dbh = DBI-CONNECT("DBI:Oracle:$instance", "$username", "$password", {RaiseError = 1, PrintError = 1, AutoCommit = 1}); $dbh-func(100,'dbms_output_enable'); $dbh-func(@text,'dbms_output_put'); # Define the SQL STATEMENT TO retrieve the data $pl_sql_1 = "BEGIN Cursor_Test_Pkg.test_reacom_comp END"; $sth_1 = $dbh-prepare($pl_sql_1); $sth_1-EXECUTE(); $sth_1-finish(); @text = $dbh-func('dbms_output.put_get'); print STDOUT (@text); $dbh-disconnect(); Once run the only output to be retrieved is the number of records (counter) that were updated. The error I receive when I run the program is as follows... DBD::Oracle::st execute failed: ORA-06550: line 3, column 7: PLS-00103: Encountered the symbol "END" when expecting one of the following: := . ( @ % ; (DBD ERROR: OCIStmtExecute) at package_call.pl line 38. The package compiled without error and running it as an anonymous block update the records as expected. Package code... CREATE OR REPLACE PACKAGE Cursor_Test_Pkg IS PROCEDURE test_reacom_comp; END Cursor_Test_Pkg; CREATE OR REPLACE PACKAGE BODY Cursor_Test_Pkg IS -- The following PROCEDURE defines the scenario for records in the PAX_HDR -- that HAVE REACOM records and that HAVE compensation. PROCEDURE test_reacom_comp IS -- This CURSOR will LOOP thru the pax records from 4 days ago to present. CURSOR reacom_comp_cur IS SELECT DISTINCT ph.pax_hdr_id FROM PAX_HDR ph, PAX_REMARKS_DET prm, PAX_COMP_DET pc, FLIGHT_HDR fh WHERE fh.flt_hdr_id = ph.flt_hdr_id AND ph.pax_hdr_id= prm.pax_hdr_id AND ph.pax_hdr_id= pc.pax_hdr_id AND ph.arr_late_gate = 'N' AND pc.arr_one_hour = 'N' AND pc.comp_amt = 0 AND EXISTS ( SELECT 1 FROM PAX_REACOM_DET pr WHERE ph.pax_hdr_id = pr.pax_hdr_id AND fh.flt_num = pr.flt_num AND fh.dep_dttm = pr.flt_dttm); ctr_1 NUMBER := 0; BEGIN -- LOOP thru the pax records from 4 days ago to present. FOR reacom_comp_rec IN reacom_comp_cur LOOP -- Count records to be UPDATED. ctr_1 := ctr_1 + 1; dbms_output.put_line(ctr_1||' record(s) updated.'); -- Update the field 'TRUE_DB' = 'N' since these records are NOT TRUE denied boardings. UPDATE PAX_HDR SET true_db = 'N' WHERE pax_hdr_id = reacom_comp_rec.pax_hdr_id; END LOOP; -- This is just a double check to show how many records will be updated as well as how many total records there are for this period. dbms_output.put_line('The total NUMBER OF records TO be UPDATED IS '||ctr_1); COMMIT; END test_reacom_comp; END Cursor_Test_Pkg; Am I calling this prodedure right? Any suggestions?? Thanks in Advance, Bob.
Re: Perl and Oracle...Help??
On Tue, 10 Apr 2001 [EMAIL PROTECTED] wrote: I'm a newbie Perl programmer and I have been looking at the documentation for calling an Oracle package from Perl. From this and with the advice of others here, I wrote some code which I thought would do the trick. I think I'm close but it's just not quite there. Can anyone see what I'm doing wrong?? HELP? Here is my code... Looks like you forgot a semicolon at the end of 'Cursor_Test_Pkg.test_reacom_comp'. Technically it's a PL/SQL error, not a DBI or Perl error. $pl_sql_1 = "BEGIN Cursor_Test_Pkg.test_reacom_comp END"; - D [EMAIL PROTECTED]
Re: Help with installing DBD::Oracle
Try using nmake, which you can get free from Microsoft.com. It took me a number of searches before I found it and I can't remember which one worked. - Paul At 02:12 PM 4/9/2001 -0500, Reuss, Bob wrote: Hello All, I am trying to install the DBD::Oracle module on my Windows 2000 system. I have downloaded the module and have extracted the files via winzip. Here is where I run into problems. If I follow the installation instructions for active state and just move the modules, it doesn't work. If I run the makefile.pl file, I get multiple library errors, but, it finds all the oracle paths correctly, and the DBI paths, etc... The problem then is I need to run make on the makefile. I do not have a make utility installed on the windows 2000 server. I tried to install a few I found on the web but they did not work. Can anyone help me with solutions on how to install the module? TIA, Bob Reuss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paul Anton Chernoch Zeborg, Inc. 500 West Cummings Park Woburn, MA 01801 t: 781.759.0105 f: 781.935.5090 c: 781.606.7382 http://www.zeborg.com This message is a personal and confidential communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Possible bug in RaiseError
DBI 1.14 DBD::Oracle ? Oracle 8.0.5 Setting RaiseError to 0 doesn't seem to work in some cases. If the wrong number of bind parameters are used the error is not caught by the if statement in the code below. If no bind parameters are used then the error is caught as expected. It doesn't seem to make any difference whether RaiseError is set to 0 with the sth or at connection. I was trying to do $sth-{RaiseError} = 0 before one section to display more information on the error but it doesn't seem to work. The following simplified code demonstrates the problem. Code: use DBI; my($dbh) = DBI-connect("dbi:Oracle:bio0_ipc", "", "", {RaiseError=0, PrintError=0, AutoCommit=0}); my($sth) = $dbh-prepare(qq{SELECT * FROM DNA_transfer_experiment WHERE id = ? or id = ?}); #$sth-{RaiseError} = 0; # the following if works as expected if (! $sth-execute() ) { print "Found error\n"; } # the following if produces the error # execute called with 3 bind variables when 2 are needed at ./tmp line 15. # instead of printing my line if (! $sth-execute("1", "2", "3") ) { print "Found error with bind variables\n"; } $sth-{RaiseError} = 1; $dbh-disconnect; exit; Thanks in advance, Belinda
RE: SQL GetData
DBD::Mysql is not for MS MSQ it is for the Mysql database www.mysql.com. You should either use ODBC or DBD::Sybase. Ilya Sterin -Original Message- From: Ebelt, Helmut [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 7:49 AM To: '[EMAIL PROTECTED]' Subject: SQL GetData How can i use the DBI / DBD::Mysql Module with MSSQL and SQLGetData. Is there anything i have to take attention to? working with latest DBI,DBD and MS SQL 7 Thanx in advance, Helmut Ebelt
RE: Help with installing DBD::Oracle
Ok, I tried nMake on the makefile and received the following output. At the bottom of the output I get a fatal error. mkdir blib mkdir blib\lib mkdir blib\lib\DBD mkdir blib\arch mkdir blib\arch\auto mkdir blib\arch\auto\DBD mkdir blib\arch\auto\DBD\Oracle mkdir blib\lib\auto mkdir blib\lib\auto\DBD mkdir blib\lib\auto\DBD\Oracle mkdir blib\man1 mkdir blib\man3 cp Oraperl.pm blib\lib/Oraperl.pm cp Oracle.pm blib\lib\DBD\Oracle.pm cp oraperl.ph blib\lib/oraperl.ph d:\interwoven\teamsite\iw-perl\bin\perl.exe -p -e "s/~DRIVER~/Oracle/g" d:\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI/Driver.xst Orac le.xsi d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW~1\teamsite\iw-pe rl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib D:\INTERW~1\teamsite\iw-pe rl\lib\ExtUtils/xsubpp -typemap D:\INTERW~1\teamsite\iw-perl\lib\ExtUtils\typem ap Oracle.xs xstmp.c d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW ~1\teamsite\iw-perl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib -MExtUtil s::Command -e mv xstmp.c Oracle.c cl.exe -c -ID:/Oracle/Ora81/oci/include -ID:/Oracle/Ora81/rdbms/demo -Id :\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI -Od -MD -DNDEBUG -DW IN32 -D_CONSOLE -DNO_STRICT -Od -MD -DNDEBUG -DVERSION=\"1.06\" -DXS_VERSIO N=\"1.06\" -ID:\INTERW~1\teamsite\iw-perl\lib\MSWin32-x86\CORE Oracle.c 'cl.exe' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1' Stop. Not sure were to take it from here. Any ideas? Thanks Bob Reuss -Original Message- From: Paul A. Chernoch [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:36 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject: Re: Help with installing DBD::Oracle Try using nmake, which you can get free from Microsoft.com. It took me a number of searches before I found it and I can't remember which one worked. - Paul At 02:12 PM 4/9/2001 -0500, Reuss, Bob wrote: Hello All, I am trying to install the DBD::Oracle module on my Windows 2000 system. I have downloaded the module and have extracted the files via winzip. Here is where I run into problems. If I follow the installation instructions for active state and just move the modules, it doesn't work. If I run the makefile.pl file, I get multiple library errors, but, it finds all the oracle paths correctly, and the DBI paths, etc... The problem then is I need to run make on the makefile. I do not have a make utility installed on the windows 2000 server. I tried to install a few I found on the web but they did not work. Can anyone help me with solutions on how to install the module? TIA, Bob Reuss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paul Anton Chernoch Zeborg, Inc. 500 West Cummings Park Woburn, MA 01801 t: 781.759.0105 f: 781.935.5090 c: 781.606.7382 http://www.zeborg.com This message is a personal and confidential communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RE: Perl and Oracle...Help??
You must come from Visual Basic. How do I know. You are not watching your upper and lower casing in your code. You have a mix of everything. Please change all your functions and variables to reflect the same case and in the functions the right case, which is usually lower case. All languages exept visual basic use the right cases and don't fix it for you like the vb interface, so you need to adapt. Ilya Sterin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:11 PM To: [EMAIL PROTECTED] Subject: Perl and Oracle...Help?? I'm a newbie Perl programmer and I have been looking at the documentation for calling an Oracle package from Perl. From this and with the advice of others here, I wrote some code which I thought would do the trick. I think I'm close but it's just not quite there. Can anyone see what I'm doing wrong?? HELP? Here is my code... USE DBI; # Define the output FILE AND its path $outfile1 = "cursor_test_1.txt"; # Define the logon variables FOR AWASUN7 $INSTANCE = "database_name"; $username = "username"; $password = "password"; # OPEN a connection TO DBC DATABASE $dbh = DBI-CONNECT("DBI:Oracle:$instance", "$username", "$password", {RaiseError = 1, PrintError = 1, AutoCommit = 1}); $dbh-func(100,'dbms_output_enable'); $dbh-func(@text,'dbms_output_put'); # Define the SQL STATEMENT TO retrieve the data $pl_sql_1 = "BEGIN Cursor_Test_Pkg.test_reacom_comp END"; $sth_1 = $dbh-prepare($pl_sql_1); $sth_1-EXECUTE(); $sth_1-finish(); @text = $dbh-func('dbms_output.put_get'); print STDOUT (@text); $dbh-disconnect(); Once run the only output to be retrieved is the number of records (counter) that were updated. The error I receive when I run the program is as follows... DBD::Oracle::st execute failed: ORA-06550: line 3, column 7: PLS-00103: Encountered the symbol "END" when expecting one of the following: := . ( @ % ; (DBD ERROR: OCIStmtExecute) at package_call.pl line 38. The package compiled without error and running it as an anonymous block update the records as expected. Package code... CREATE OR REPLACE PACKAGE Cursor_Test_Pkg IS PROCEDURE test_reacom_comp; END Cursor_Test_Pkg; CREATE OR REPLACE PACKAGE BODY Cursor_Test_Pkg IS -- The following PROCEDURE defines the scenario for records in the PAX_HDR -- that HAVE REACOM records and that HAVE compensation. PROCEDURE test_reacom_comp IS -- This CURSOR will LOOP thru the pax records from 4 days ago to present. CURSOR reacom_comp_cur IS SELECT DISTINCT ph.pax_hdr_id FROM PAX_HDR ph, PAX_REMARKS_DET prm, PAX_COMP_DET pc, FLIGHT_HDR fh WHERE fh.flt_hdr_id = ph.flt_hdr_id AND ph.pax_hdr_id= prm.pax_hdr_id AND ph.pax_hdr_id= pc.pax_hdr_id AND ph.arr_late_gate = 'N' AND pc.arr_one_hour = 'N' AND pc.comp_amt = 0 AND EXISTS ( SELECT 1 FROM PAX_REACOM_DET pr WHERE ph.pax_hdr_id = pr.pax_hdr_id AND fh.flt_num = pr.flt_num AND fh.dep_dttm = pr.flt_dttm); ctr_1 NUMBER := 0; BEGIN -- LOOP thru the pax records from 4 days ago to present. FOR reacom_comp_rec IN reacom_comp_cur LOOP -- Count records to be UPDATED. ctr_1 := ctr_1 + 1; dbms_output.put_line(ctr_1||' record(s) updated.'); -- Update the field 'TRUE_DB' = 'N' since these records are NOT TRUE denied boardings. UPDATE PAX_HDR SET true_db = 'N' WHERE pax_hdr_id = reacom_comp_rec.pax_hdr_id; END LOOP; -- This is just a double check to show how many records will be updated as well as how many total records there are for this period. dbms_output.put_line('The total NUMBER OF records TO be UPDATED IS '||ctr_1); COMMIT; END test_reacom_comp; END Cursor_Test_Pkg; Am I calling this prodedure right? Any suggestions?? Thanks in Advance, Bob.
Re: Help with installing DBD::Oracle
If he has MSVC, he has nmake. If he doesn't, he also doesn't have the compiler or libraries he needs to build DBD::Oracle using nmake. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: "Paul A. Chernoch" [EMAIL PROTECTED] To: "Reuss, Bob" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 12:36 PM Subject: Re: Help with installing DBD::Oracle Try using nmake, which you can get free from Microsoft.com. It took me a number of searches before I found it and I can't remember which one worked. - Paul At 02:12 PM 4/9/2001 -0500, Reuss, Bob wrote: Hello All, I am trying to install the DBD::Oracle module on my Windows 2000 system. I have downloaded the module and have extracted the files via winzip. Here is where I run into problems. If I follow the installation instructions for active state and just move the modules, it doesn't work. If I run the makefile.pl file, I get multiple library errors, but, it finds all the oracle paths correctly, and the DBI paths, etc... The problem then is I need to run make on the makefile. I do not have a make utility installed on the windows 2000 server. I tried to install a few I found on the web but they did not work. Can anyone help me with solutions on how to install the module?
RE: Help with installing DBD::Oracle
You don't have you VC environmental variables set up. See where you cl.exe is located and add that path to you PATH. Ilya Sterin -Original Message- From: Reuss, Bob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 4:54 PM To: [EMAIL PROTECTED] Subject: RE: Help with installing DBD::Oracle Ok, I tried nMake on the makefile and received the following output. At the bottom of the output I get a fatal error. mkdir blib mkdir blib\lib mkdir blib\lib\DBD mkdir blib\arch mkdir blib\arch\auto mkdir blib\arch\auto\DBD mkdir blib\arch\auto\DBD\Oracle mkdir blib\lib\auto mkdir blib\lib\auto\DBD mkdir blib\lib\auto\DBD\Oracle mkdir blib\man1 mkdir blib\man3 cp Oraperl.pm blib\lib/Oraperl.pm cp Oracle.pm blib\lib\DBD\Oracle.pm cp oraperl.ph blib\lib/oraperl.ph d:\interwoven\teamsite\iw-perl\bin\perl.exe -p -e "s/~DRIVER~/Oracle/g" d:\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI/Driver.xst Orac le.xsi d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW~1\teamsite\iw-pe rl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib D:\INTERW~1\teamsite\iw-pe rl\lib\ExtUtils/xsubpp -typemap D:\INTERW~1\teamsite\iw-perl\lib\ExtUtils\typem ap Oracle.xs xstmp.c d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW ~1\teamsite\iw-perl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib -MExtUtil s::Command -e mv xstmp.c Oracle.c cl.exe -c -ID:/Oracle/Ora81/oci/include -ID:/Oracle/Ora81/rdbms/demo -Id :\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI -Od -MD -DNDEBUG -DW IN32 -D_CONSOLE -DNO_STRICT -Od -MD -DNDEBUG -DVERSION=\"1.06\" -DXS_VERSIO N=\"1.06\" -ID:\INTERW~1\teamsite\iw-perl\lib\MSWin32-x86\CORE Oracle.c 'cl.exe' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1' Stop. Not sure were to take it from here. Any ideas? Thanks Bob Reuss -Original Message- From: Paul A. Chernoch [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:36 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject: Re: Help with installing DBD::Oracle Try using nmake, which you can get free from Microsoft.com. It took me a number of searches before I found it and I can't remember which one worked. - Paul At 02:12 PM 4/9/2001 -0500, Reuss, Bob wrote: Hello All, I am trying to install the DBD::Oracle module on my Windows 2000 system. I have downloaded the module and have extracted the files via winzip. Here is where I run into problems. If I follow the installation instructions for active state and just move the modules, it doesn't work. If I run the makefile.pl file, I get multiple library errors, but, it finds all the oracle paths correctly, and the DBI paths, etc... The problem then is I need to run make on the makefile. I do not have a make utility installed on the windows 2000 server. I tried to install a few I found on the web but they did not work. Can anyone help me with solutions on how to install the module? TIA, Bob Reuss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paul Anton Chernoch Zeborg, Inc. 500 West Cummings Park Woburn, MA 01801 t: 781.759.0105 f: 781.935.5090 c: 781.606.7382 http://www.zeborg.com This message is a personal and confidential communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Re: Help with installing DBD::Oracle
It appears that InterWoven used some version of Microsoft Visual C++ (MSVC) to build perl.exe. In order to build DBI and DBD::Oracle, you need the same version of Microsoft Visual C++ (MSVC). If you don't install Microsoft Visual C++ (MSVC), you have neither a C compiler nor the compatible C libraries for DBI or DBD::Oracle to properly interact with perl.exe. If you do have Microsoft Visual C++ (MSVC) installed, you need to initialize you environment so nmake.exe and cmd.exe can find cl.exe and cl.exe can find the required header and library files. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: "Reuss, Bob" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 1:54 PM Subject: RE: Help with installing DBD::Oracle Ok, I tried nMake on the makefile and received the following output. At the bottom of the output I get a fatal error. mkdir blib mkdir blib\lib mkdir blib\lib\DBD mkdir blib\arch mkdir blib\arch\auto mkdir blib\arch\auto\DBD mkdir blib\arch\auto\DBD\Oracle mkdir blib\lib\auto mkdir blib\lib\auto\DBD mkdir blib\lib\auto\DBD\Oracle mkdir blib\man1 mkdir blib\man3 cp Oraperl.pm blib\lib/Oraperl.pm cp Oracle.pm blib\lib\DBD\Oracle.pm cp oraperl.ph blib\lib/oraperl.ph d:\interwoven\teamsite\iw-perl\bin\perl.exe -p -e "s/~DRIVER~/Oracle/g" d:\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI/Driver.xst Orac le.xsi d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW~1\teamsite\iw-pe rl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib D:\INTERW~1\teamsite\iw-pe rl\lib\ExtUtils/xsubpp -typemap D:\INTERW~1\teamsite\iw-perl\lib\ExtUtils\typem ap Oracle.xs xstmp.c d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW ~1\teamsite\iw-perl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib -MExtUtil s::Command -e mv xstmp.c Oracle.c cl.exe -c -ID:/Oracle/Ora81/oci/include -ID:/Oracle/Ora81/rdbms/demo -Id :\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI -Od -MD -DNDEBUG -DW IN32 -D_CONSOLE -DNO_STRICT -Od -MD -DNDEBUG -DVERSION=\"1.06\" -DXS_VERSIO N=\"1.06\" -ID:\INTERW~1\teamsite\iw-perl\lib\MSWin32-x86\CORE Oracle.c 'cl.exe' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1' Stop. Not sure were to take it from here. Any ideas? -Original Message- From: Paul A. Chernoch [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:36 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject: Re: Help with installing DBD::Oracle Try using nmake, which you can get free from Microsoft.com. It took me a number of searches before I found it and I can't remember which one worked. At 02:12 PM 4/9/2001 -0500, Reuss, Bob wrote: Hello All, I am trying to install the DBD::Oracle module on my Windows 2000 system. I have downloaded the module and have extracted the files via winzip. Here is where I run into problems. If I follow the installation instructions for active state and just move the modules, it doesn't work. If I run the makefile.pl file, I get multiple library errors, but, it finds all the oracle paths correctly, and the DBI paths, etc... The problem then is I need to run make on the makefile. I do not have a make utility installed on the windows 2000 server. I tried to install a few I found on the web but they did not work. Can anyone help me with solutions on how to install the module?
RE: Help with installing DBD::Oracle
You must have VC++ installed to have it. It's the Visual C++ compiler. You must have it in order to compile DBD::Oracle. -Original Message- From: Reuss, Bob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: RE: Help with installing DBD::Oracle I do not have cl.exe on my machine. I have a setupcl.exe but when I run it to see if it will install I receive the following message. "application can not be run in win 32 mode" What does the cl.exe do? Can I get it from somewhere or install software that will install it? Thanks, Bob Reuss -Original Message- From: Sterin, Ilya [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 4:04 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject: RE: Help with installing DBD::Oracle You don't have you VC environmental variables set up. See where you cl.exe is located and add that path to you PATH. Ilya Sterin -Original Message- From: Reuss, Bob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 4:54 PM To: [EMAIL PROTECTED] Subject: RE: Help with installing DBD::Oracle Ok, I tried nMake on the makefile and received the following output. At the bottom of the output I get a fatal error. mkdir blib mkdir blib\lib mkdir blib\lib\DBD mkdir blib\arch mkdir blib\arch\auto mkdir blib\arch\auto\DBD mkdir blib\arch\auto\DBD\Oracle mkdir blib\lib\auto mkdir blib\lib\auto\DBD mkdir blib\lib\auto\DBD\Oracle mkdir blib\man1 mkdir blib\man3 cp Oraperl.pm blib\lib/Oraperl.pm cp Oracle.pm blib\lib\DBD\Oracle.pm cp oraperl.ph blib\lib/oraperl.ph d:\interwoven\teamsite\iw-perl\bin\perl.exe -p -e "s/~DRIVER~/Oracle/g" d:\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI/Driver.xst Orac le.xsi d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW~1\teamsite\iw-pe rl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib D:\INTERW~1\teamsite\iw-pe rl\lib\ExtUtils/xsubpp -typemap D:\INTERW~1\teamsite\iw-perl\lib\ExtUtils\typem ap Oracle.xs xstmp.c d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW ~1\teamsite\iw-perl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib -MExtUtil s::Command -e mv xstmp.c Oracle.c cl.exe -c -ID:/Oracle/Ora81/oci/include -ID:/Oracle/Ora81/rdbms/demo -Id :\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI -Od -MD -DNDEBUG -DW IN32 -D_CONSOLE -DNO_STRICT -Od -MD -DNDEBUG -DVERSION=\"1.06\" -DXS_VERSIO N=\"1.06\" -ID:\INTERW~1\teamsite\iw-perl\lib\MSWin32-x86\CORE Oracle.c 'cl.exe' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1' Stop. Not sure were to take it from here. Any ideas? Thanks Bob Reuss -Original Message- From: Paul A. Chernoch [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:36 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject:Re: Help with installing DBD::Oracle Try using nmake, which you can get free from Microsoft.com. It took me a number of searches before I found it and I can't remember which one worked. - Paul At 02:12 PM 4/9/2001 -0500, Reuss, Bob wrote: Hello All, I am trying to install the DBD::Oracle module on my Windows 2000 system. I have downloaded the module and have extracted the files via winzip. Here is where I run into problems. If I follow the installation instructions for active state and just move the modules, it doesn't work. If I run the makefile.pl file, I get multiple library errors, but, it finds all the oracle paths correctly, and the DBI paths, etc... The problem then is I need to run make on the makefile. I do not have a make utility installed on the windows 2000 server. I tried to install a few I found on the web but they did not work. Can anyone help me with solutions on how to install the module? TIA, Bob Reuss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paul Anton Chernoch Zeborg, Inc. 500 West Cummings Park Woburn, MA 01801 t: 781.759.0105 f: 781.935.5090 c: 781.606.7382 http://www.zeborg.com This message is a personal and confidential communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Re: General ?'s about DBD's and platforms
ActiveState has added distributions for Linux and Solaris 2.6 since at least Build 611 though I don't think I have seen anyone here that is using them yet. For most UNIXs, building Perl and supporting modules is very straight forward. You'd probably be best advised to use ActiveState's Perl for Win32, Intel Solaris, and Intel Linux and build a standard tarball for at same perl and module version levels to distribute to the other platforms you have to support. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: "Sterin, Ilya" [EMAIL PROTECTED] To: "Capacio, Paula J" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 2:00 PM Subject: RE: General ?'s about DBD's and platforms Just an answer to one of your questions. Activestate distribution is for Windows. For unix all modules are stored in www.cpan.org Ilya Sterin -Original Message- From: Capacio, Paula J [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 12:42 PM To: [EMAIL PROTECTED] Subject: General ?'s about DBD's and platforms PSCI_1I am relatively new to Perl, primary experience through Windows NT with limited knowledge of UNIX. I have been instructed to identify a corporate standard version of Perl and upgrade our desktops and servers. For servers we have NT, HP/UX and SunSolaris. We run Oracle 7 8, and DB2 UDB. Is it naive of me to think that I can have one standard build of perl for the corporation? I was thinking of having one, with DBD's for all our databases included...meaning the DB2 DBD would be installed even on a server running only Oracle; it wouldn't be used it would just be there such that there was a standard configuration. Or should I have multiple configurations, one per OS platform and even perhaps DBMS? I saw in the dbi-archives warnings against mixing Oracle 7 8 implementations. Yet saw other items indicating users having both Oracle and Oracle8 DBD's installed. Can someone clarify this for me, can I have both versions of the Oracle DBD or do I have to match the Oracle client and/or DB level? Also, when looking at the ActiveState ActivePerl5.6 build 623 PPM packages, it appears that the DBD:Oracle is not available for Solaris and no mention of UNIX whatsoever. http://www.activestate.com/ASPN/Downloads/ActivePerl/PPM/Packages Should I be looking somewhere else (CPAN) instead? I've never done Make's before...and well you know, it's kind of a fear of the unknownok...I'm chicken :-)
RE: Help with installing DBD::Oracle
Thanks llya, Micheal, and Paul for all the help. I will get Visual C++ installed and see where it takes me. Thanks again, Bob Reuss -Original Message- From: Sterin, Ilya [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 4:22 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject: RE: Help with installing DBD::Oracle You must have VC++ installed to have it. It's the Visual C++ compiler. You must have it in order to compile DBD::Oracle. -Original Message- From: Reuss, Bob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: RE: Help with installing DBD::Oracle I do not have cl.exe on my machine. I have a setupcl.exe but when I run it to see if it will install I receive the following message. "application can not be run in win 32 mode" What does the cl.exe do? Can I get it from somewhere or install software that will install it? Thanks, Bob Reuss -Original Message- From: Sterin, Ilya [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 4:04 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject:RE: Help with installing DBD::Oracle You don't have you VC environmental variables set up. See where you cl.exe is located and add that path to you PATH. Ilya Sterin -Original Message- From: Reuss, Bob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 4:54 PM To: [EMAIL PROTECTED] Subject: RE: Help with installing DBD::Oracle Ok, I tried nMake on the makefile and received the following output. At the bottom of the output I get a fatal error. mkdir blib mkdir blib\lib mkdir blib\lib\DBD mkdir blib\arch mkdir blib\arch\auto mkdir blib\arch\auto\DBD mkdir blib\arch\auto\DBD\Oracle mkdir blib\lib\auto mkdir blib\lib\auto\DBD mkdir blib\lib\auto\DBD\Oracle mkdir blib\man1 mkdir blib\man3 cp Oraperl.pm blib\lib/Oraperl.pm cp Oracle.pm blib\lib\DBD\Oracle.pm cp oraperl.ph blib\lib/oraperl.ph d:\interwoven\teamsite\iw-perl\bin\perl.exe -p -e "s/~DRIVER~/Oracle/g" d:\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI/Driver.xst Orac le.xsi d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW~1\teamsite\iw-pe rl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib D:\INTERW~1\teamsite\iw-pe rl\lib\ExtUtils/xsubpp -typemap D:\INTERW~1\teamsite\iw-perl\lib\ExtUtils\typem ap Oracle.xs xstmp.c d:\interwoven\teamsite\iw-perl\bin\perl.exe -Id:\INTERW ~1\teamsite\iw-perl\lib\MSWin32-x86 -Id:\INTERW~1\teamsite\iw-perl\lib -MExtUtil s::Command -e mv xstmp.c Oracle.c cl.exe -c -ID:/Oracle/Ora81/oci/include -ID:/Oracle/Ora81/rdbms/demo -Id :\interwoven\teamsite\iw-perl\site\lib/MSWin32-x86/auto/DBI -Od -MD -DNDEBUG -DW IN32 -D_CONSOLE -DNO_STRICT -Od -MD -DNDEBUG -DVERSION=\"1.06\" -DXS_VERSIO N=\"1.06\" -ID:\INTERW~1\teamsite\iw-perl\lib\MSWin32-x86\CORE Oracle.c 'cl.exe' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1' Stop. Not sure were to take it from here. Any ideas? Thanks Bob Reuss -Original Message- From: Paul A. Chernoch [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:36 PM To: Reuss, Bob; [EMAIL PROTECTED] Subject: Re: Help with installing DBD::Oracle Try using nmake, which you can get free from Microsoft.com. It took me a number of searches before I found it and I can't remember which one worked. - Paul At 02:12 PM 4/9/2001 -0500, Reuss, Bob wrote: Hello All, I am trying to install the DBD::Oracle module on my Windows 2000 system. I have downloaded the module and have extracted the files via winzip. Here is where I run into problems. If I follow the installation instructions for active state and just move the modules, it doesn't work. If I run the makefile.pl file, I get multiple library errors, but, it finds all the oracle paths correctly, and the DBI paths, etc... The problem then is I need to run make on the makefile. I do not have a make utility installed on the windows 2000 server. I tried to install a few I found on the web but they did not work. Can anyone help me with solutions on how to install the module? TIA, Bob Reuss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paul Anton Chernoch Zeborg, Inc. 500 West Cummings Park Woburn, MA 01801 t: 781.759.0105 f: 781.935.5090 c: 781.606.7382 http://www.zeborg.com This message is a personal and confidential communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and
PERLCC and DBI
Hi, I am starting to use the Perl Compiler perlcc to make some tests... Ok, Ok, it's only a beta, maybe an alfa But... I am trying to compile very single scripts using an script that emules the PERLCC, basicly it generates the C code with: perl -I/usr/local/lib/perl5/5.6.1/i686-linux -I/usr/local/lib/perl5/5.6.1 -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux -I/usr/local/lib/perl5/site_perl/5.6.1 -I/usr/local/lib/perl5/site_perl -I. -MO=C,-umain,-uattributes,-uDB,-ofile.c file.pl Then, I compile it using: gcc -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -o ./$arquivo $arquivo.c -rdynamic -Wl,-rpath,/usr/local/lib/perl5/5.6.1/i686-linux/CORE -L/usr/local/lib /usr/local/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -lc -lcrypt -lutil -L/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ -I/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ When I use it in a very simple scripts like scripts without calling modules, or calling modules like CGI.pm it works fine. But when I try to use de DBI to connect to a MySQL database, I compile the archive, but when I try to execute it returns an error not present in the original script: Can't locate object method "connect" via package "DBI" (perhaps you forgot to load "DBI"?) at teste.pl line 9. I included the mysql DBD directories and put use DBD::mysql into the code without sucess. Do anyone have any idea of what is going on it ? Thanks Slepetys
Re: Help with installing DBD::Oracle
If you can, install it in the same location as InterWoven used. See the libpth in 'perl -V' output to tell you where. If you can't, perhaps you can edit Config.pm to reflect the correct paths to the MSVC components. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: "Reuss, Bob" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 2:21 PM Subject: RE: Help with installing DBD::Oracle Thanks llya, Micheal, and Paul for all the help. I will get Visual C++ installed and see where it takes me.
RE: PERLCC and DBI
Well did you use DBI? Try to run script with interpreter to see if that works first. Ilya Sterin -Original Message- From: Roberto Slepetys Ferreira [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 5:28 PM To: [EMAIL PROTECTED] Subject: PERLCC and DBI Hi, I am starting to use the Perl Compiler perlcc to make some tests... Ok, Ok, it's only a beta, maybe an alfa But... I am trying to compile very single scripts using an script that emules the PERLCC, basicly it generates the C code with: perl -I/usr/local/lib/perl5/5.6.1/i686-linux -I/usr/local/lib/perl5/5.6.1 -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux -I/usr/local/lib/perl5/site_perl/5.6.1 -I/usr/local/lib/perl5/site_perl -I. -MO=C,-umain,-uattributes,-uDB,-ofile.c file.pl Then, I compile it using: gcc -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -o ./$arquivo $arquivo.c -rdynamic -Wl,-rpath,/usr/local/lib/perl5/5.6.1/i686-linux/CORE -L/usr/local/lib /usr/local/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -lc -lcrypt -lutil -L/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ -I/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ When I use it in a very simple scripts like scripts without calling modules, or calling modules like CGI.pm it works fine. But when I try to use de DBI to connect to a MySQL database, I compile the archive, but when I try to execute it returns an error not present in the original script: Can't locate object method "connect" via package "DBI" (perhaps you forgot to load "DBI"?) at teste.pl line 9. I included the mysql DBD directories and put use DBD::mysql into the code without sucess. Do anyone have any idea of what is going on it ? Thanks Slepetys
Re: PERLCC and DBI
Hi Ilya, The first think that I made was to run the script with perl, and it worked fine. The script is very simple, only for tests: #!/usr/bin/perl use CGI qw(:standard); use DBI qw(:connect); print header; my $db1 = DBI-connect("DBI:mysql:X", "X", "X"); my $sql = "SHOW tables;"; my $tarefa = $db1-prepare($sql); $tarefa-execute(); while ($saida = $tarefa - fetchrow_array){ print $saida."\n"; } $tarefa - finish(); $db1-disconnect; exit(0); Where I omitted the database,user and password. Thanks Roberto - Original Message - From: "Sterin, Ilya" [EMAIL PROTECTED] To: "Roberto Slepetys Ferreira" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 6:41 PM Subject: RE: PERLCC and DBI Well did you use DBI? Try to run script with interpreter to see if that works first. Ilya Sterin -Original Message- From: Roberto Slepetys Ferreira [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 5:28 PM To: [EMAIL PROTECTED] Subject: PERLCC and DBI Hi, I am starting to use the Perl Compiler perlcc to make some tests... Ok, Ok, it's only a beta, maybe an alfa But... I am trying to compile very single scripts using an script that emules the PERLCC, basicly it generates the C code with: perl -I/usr/local/lib/perl5/5.6.1/i686-linux -I/usr/local/lib/perl5/5.6.1 -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux -I/usr/local/lib/perl5/site_perl/5.6.1 -I/usr/local/lib/perl5/site_perl -I. -MO=C,-umain,-uattributes,-uDB,-ofile.c file.pl Then, I compile it using: gcc -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -o ./$arquivo $arquivo.c -rdynamic -Wl,-rpath,/usr/local/lib/perl5/5.6.1/i686-linux/CORE -L/usr/local/lib /usr/local/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -lc -lcrypt -lutil -L/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ -I/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ When I use it in a very simple scripts like scripts without calling modules, or calling modules like CGI.pm it works fine. But when I try to use de DBI to connect to a MySQL database, I compile the archive, but when I try to execute it returns an error not present in the original script: Can't locate object method "connect" via package "DBI" (perhaps you forgot to load "DBI"?) at teste.pl line 9. I included the mysql DBD directories and put use DBD::mysql into the code without sucess. Do anyone have any idea of what is going on it ? Thanks Slepetys
PROGRESS
I saw in a mensage posted here about 4 months ago that the module DBD::PROGRESS have the development discontinued. I need to connect to the PROGRESS database by an Web application, and I had hope to use some DBD, now I am looking at the JDBC, PHP or other thinks... Do anyone have experience with PROGRESS - PERL talking ? Thanks Slepetys
Bizarre DBD::Oracle Segfault
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I sent an email to the dbi-users list about a number of DBD::Oracle CLOB handling problems waaay back (end of January or so) that today someone dug up and inquired if I had ever found fixes for what I had pointed out. The problems outlined that day turned out to be the test script itself, which was doing so much bizarre stuff on one statement that DBD::Oracle just went to sleep instead (and so was the actual program that instigated the writing of the test script). Well, all but one problem was the script. This, the most serious one, continues to linger: my $st = $db-prepare('INSERT INTO foo (col1, col2, col3) VALUES (?,?,?)'); $st-bind_param(3,undef,{ ora_type = ORA_CLOB }); $st-execute('A','A',undef); On Linux, DBI 1.15, Oracle 8.1.6, and DBD::Oracle 1.06, this segfaults on the execute. Unfortunately this manifests itself too deep in Oracle for me to debug. The bizarre part is, either of the two snippets below will work: my $st = $db-prepare('INSERT INTO foo (col1, col2, col3) VALUES (?,?,?)'); $st-bind_param(3,undef,{ ora_type = ORA_CLOB }); $st-execute('A','A',''); $st-execute('B','B',undef); my $st = $db-prepare('INSERT INTO foo (col1, col2, col3) VALUES (?,?,?)'); $st-bind_param(3,undef,{ ora_type = ORA_CLOB }); $st-execute('A','A',$lobvalue); $st-execute('B','B',undef); It's only when binding undef as the LOB value in the very first execute of a statement that the segfault occurs. At any other time, it's kosher. That qualifies as bizarre in my book. Your guess is better than mine. - -- Stephen Clouse [EMAIL PROTECTED] Senior Programmer, IQ Coordinator Project Lead The IQ Group, Inc. http://www.theiqgroup.com/ -BEGIN PGP SIGNATURE- Version: PGP 6.5.8 iQA+AwUBOtPDwgOGqGs0PadnEQLmtgCeJHTStLu8Q8oFb9UQ4995f8vhZH8Al1p6 RD5m0FEJH2tQiY0+b6542mQ= =L0M+ -END PGP SIGNATURE-
Problems installing with Perl 5.6, Oracla 8i, Sparc Solaris 8
Greetings, While attempting to install version 1.06 of DBD for Oracle 8i on a Sparc running Solaris 8, using Perl 5.6.0, I ran into to the following problems. After reading though the various READMEs, and scouring the WWW, I didn't find any helpful information. Before I go digging into this further, has anyone else seen the following errors and discovered how to correct them? If it makes any difference, the same errors occured when I tried using gcc as well. Like other things that I've tried, the static build and using "perl Makefile.PL -p" didn't allow this to succeed either. Discovering Oracle OCI build rules... Warning: Oracle build rule discovery failed (256) Oracle oci build command: cc -L/oracle/OraHome1/lib/ -L/oracle/OraHome1/rdbms/lib/ -o DBD_ORA_EXE DBD_ORA_OBJ.o -lclntsh /oracle/OraHome1/rdbms/lib/kpuadef.o `sed -e 's/-ljava//g' /oracle/OraHome1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 `sed -e 's/-ljava//g' /oracle/OraHome1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lwtc8 -lmm -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `sed -e 's/-ljava//g' /oracle/OraHome1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 `sed -e 's/-ljava//g' /oracle/OraHome1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -ltrace8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `cat /oracle/OraHome1/lib/sysliblist` `if [ -f /usr/lib/libsched.so ] ; then echo -lsched ; else true; fi` -R/oracle/OraHome1/lib -laio -lposix4 -lkstat -lm -lthread ld: fatal: file DBD_ORA_OBJ.o: unknown file type ld: fatal: File processing errors. No output written to DBD_ORA_EXE *** Error code 1 make: Fatal error: Command failed for target `build' Unable to interpret Oracle oci build commands. Using fallback approach. Some warnings, but no errors, during make, appeared as well; after make test: t/plsql.dubious Test returned status 0 (wstat 139, 0x8b) test program seems to have generated a core DIED. FAILED tests 55-63 Failed 9/63 tests, 85.71% okay t/reauthskipped test on this platform Failed Test Status Wstat Total Fail Failed List of failed --- t/plsql.t 0 139639 14.29% 55-63 1 test skipped. Failed 1/5 test scripts, 80.00% okay. 9/224 subtests failed, 95.98% okay. *** Error code 29 make: Fatal error: Command failed for target `test_dynamic' The output from Perl -V: Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos morgana 5.8 generic_108528-05 sun4u sparc sunw,ultra-1 ' config_args='-Dcc=gcc -Dpath=/usr/local/perl -des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release) cppflags='-fno-strict-aliasing' ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' ' libpth=/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Apr 9 2001 17:07:38 @INC: /usr/local/lib/perl5/5.6.0/sun4-solaris /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl . -- Copyright (C) 2001 R. D. DavisAncient guru who see future once say: All Rights Reserved "wise man who meditate upon immortal wisdom [EMAIL PROTECTED] 410-744-4900of Bart Simpson's words: "Don't have a cow, http://www.perqlogic.com/rdd man" will enjoy interesting life."
Re: Can't install DBI on WinNT - no make and PPM doesn't find DBI
If you really have ActiveState Perl, PPM is the correct way to install modules. There are some special things you have to do if you are behind a firewall. Other issues are covered in the PM documentatino that is part of the ActivePerl Online Documentation. An exact log of your attempt to load with PPM may help someone here see what the problem is. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: Kutler, Christopher [EMAIL PROTECTED] To: 'DBI User Group' [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 6:11 AM Subject: Can't install DBI on WinNT - no make and PPM doesn't find DBI I've fallen at the first hurdle while trying to install the DBI module. I've run Makefile.pl, however my system doesn't recognise the make command which the readme.txt states that I should run. I've also tried to install the package via PPM (ActivePerl v 617), however it can't find the DBI module or any other module.