doubt on DBI.pm

2004-02-07 Thread thenmozhi sivam
Respected Sir,
  
 I am doing my project in perl. I want to have database connectivity with 
oracle. I have installed DBI.pm
DBD.pm .But I get the following error.
 
   Can't locate loadable object for module DBI in @INC  (@INC contains: C:/Perl/lib 
C:/Perl/site/lib .) at :/Perl/site/lib/DBI.pm line 252
BEGIN failed--compilation aborted at C:/Perl/site/lib/DBI.pm line 252. 
 
Sir,
   I am working with perl on Windows2000.
So please reply me how to establish a connection with
the database.Why the above error comes so?
 
Please reply as early as possible.
 
Thanking you.
 
 
Yours truly,
Thenmozhi
 
 
 
 

 


Yahoo! India Education Special: Study in the UK now.

Doubt in DBI module

2004-02-07 Thread Vanathi Palanisamy
Sir,
  I want to have database connectivity with oracle. I have installed DBI.pm
DBD.pm .But I get the following error.
 
   Can't locate loadable object for module DBI in @INC  (@INC contains: C:/Perl/lib 
C:/Perl/site/lib .) at :/Perl/site/lib/DBI.pm line 252
BEGIN failed--compilation aborted at C:/Perl/site/lib/DBI.pm line 252. 
 
I am working in linux...
 
Please reply as early as possible.
 
 



-
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Re: Doubt in DBI module

2004-02-07 Thread Michael A Chase
On 02/07/2004 12:35 AM, Vanathi Palanisamy wrote:

I want to have database connectivity with oracle. I have installed
DBI.pm DBD.pm .But I get the following error.
   Can't locate loadable object for module DBI in @INC  (@INC
contains: C:/Perl/lib C:/Perl/site/lib .) at :/Perl/site/lib/DBI.pm
line 252 BEGIN failed--compilation aborted at C:/Perl/site/lib/DBI.pm
line 252. 
I am working in linux...
Read README for build and install instructions.  DBI includes binary
components, so just copying DBI.pm to some random directory will not work.
For ActivePerl, install DBI and DBD-Oracle using PPM.

   http://dev.isystek.com/dbi/fom-serve/cache/62.html

--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


perl query, please clear my doubt.

2003-11-27 Thread chirag idnani
Hello sir/madam,
 
I am trying out a few sample perl programs to connect to a database ( i.e 
msaccess using perl), i have been able to install dbi.pm on my machine but still when 
i run the script i get the following error:
 
This is the error:
Can't locate object method connect via package DBI (perhaps you forgot to load 
DBI?) at conn.pl line 12.
 
Here is the script that i am running:
 
#! c:\perl\bin\perl.exe
 
use DBI;
 
my $dbh = DBI-connect('DBI:ODBC:staff');
 
my $sqlCmd = SELECT * FROM staff;;
 
my $sthCmd = $dbh-prepare('$sqlCmd') or die;
 
$sthCmd-execute or die;
 
exit(0);

I presume that the installation of DBI has not been done properly, can you kindly 
provide me with the exact installation procedure of DBI on windows or any other 
suggestion that you think could solve the problem.
 
Thanking you,
 
Yours Sincerely,
Chirag Idnani
 
 
 



-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

Re: perl query, please clear my doubt.

2003-11-27 Thread Michael A Chase
On Wed, 26 Nov 2003 20:46:38 -0800 (PST) chirag idnani
[EMAIL PROTECTED] wrote:

 Hello sir/madam,
  
 I am trying out a few sample perl programs to connect to a database
 ( i.e msaccess using perl), i have been able to install dbi.pm on my
 machine but still when i run the script i get the following error:

There is no dbi.pm.  There is a DBI.pm, but it is only a part of the
DBI module, just copying it into your machine is insufficient.

 This is the error:
 Can't locate object method connect via package DBI (perhaps you
 forgot to load DBI?) at conn.pl line 12.

 I presume that the installation of DBI has not been done properly,
 can you kindly provide me with the exact installation procedure of
 DBI on windows or any other suggestion that you think could solve the
 problem.

http://dev.isystek.com/dbi/fom-serve/cache/13.html

-- 
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


RE: doubt

2002-09-10 Thread Agarwal, Ramakant

Hi,

 I did not get any answer to my first question and asking for one more
doubt.

The problem is that I have a query some thing like this

select fields from table_name
where field_1 in  set_of_values

The problem is that this query is working fine when there is only one value
in the set_of_values ,for ex. a
but if I have more than 1 value in the value set then it is not not giving
any result,for ex a,b

I tested the query using both ora perl and Perldbi but nothing is working.
Can anyone please help me out?
Thanks in advance..

P.S. Please let me know if you want any relevant details regarding this or
if the problem is not clear.

Thanks,
Ramakant


-Original Message-
From: Agarwal, Ramakant 
Sent: Wednesday, September 04, 2002 7:54 PM
To: [EMAIL PROTECTED]
Subject: RE: doubt


Hi,

 I have some stored procedure/function in oracle and it returns the result
through ref cursor. I want to know if we can use perl scripts to invoke this
procedure and get the result using ref cursor. Can you please help??


Thanks,
Ramakant





RE: doubt

2002-09-10 Thread Mitsuda, Alex

Try delimiting each element of the in clause, i.e.  ...in ('a','b')

-Original Message-
From: Agarwal, Ramakant [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 9:25 AM
To: '[EMAIL PROTECTED]'
Subject: RE: doubt


Hi,

 I did not get any answer to my first question and asking for one more
doubt.

The problem is that I have a query some thing like this

select fields from table_name
where field_1 in  set_of_values

The problem is that this query is working fine when there is only one value
in the set_of_values ,for ex. a
but if I have more than 1 value in the value set then it is not not giving
any result,for ex a,b

I tested the query using both ora perl and Perldbi but nothing is working.
Can anyone please help me out?
Thanks in advance..

P.S. Please let me know if you want any relevant details regarding this or
if the problem is not clear.

Thanks,
Ramakant


-Original Message-
From: Agarwal, Ramakant 
Sent: Wednesday, September 04, 2002 7:54 PM
To: [EMAIL PROTECTED]
Subject: RE: doubt


Hi,

 I have some stored procedure/function in oracle and it returns the result
through ref cursor. I want to know if we can use perl scripts to invoke this
procedure and get the result using ref cursor. Can you please help??


Thanks,
Ramakant

This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. 
E-mail transmission cannot be guaranteed to be secure or error-free. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message that arise as a result of e-mail transmission.
This message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments. 
 All e-mails at Neuberger Berman are, in accordance with Firm policy, to be
used for Neuberger Berman business purposes only. E-mails sent from or to
the Firm are subject to being reviewed by the Firm in accordance with the
Firm's procedure for the review of correspondence.



Re: doubt

2002-09-10 Thread Ronald J Kimball

On Tue, Sep 10, 2002 at 06:54:43PM +0530, Agarwal, Ramakant wrote:
 Hi,
 
  I did not get any answer to my first question and asking for one more
 doubt.
 
 The problem is that I have a query some thing like this
 
 select fields from table_name
 where field_1 in  set_of_values
 
 The problem is that this query is working fine when there is only one value
 in the set_of_values ,for ex. a
 but if I have more than 1 value in the value set then it is not not giving
 any result,for ex a,b

Each placeholder represents one value in the statement.  You cannot bind
multiple values to a single placeholder.  You will have to either
interpolate the values directly into the statement, or prepare the
statement with the appropriate number of placeholders.

Here is an approach I have used in this kind of situation, which does a
single prepare for each number of values the appears:

my sth;

while (my values = get_values()) {

  $sth[@values] ||= $dbh-prepare('SELECT * FROM mytable WHERE id IN ( ' .
  join(', ', ('?') x values) . ' )');

  $sth[@values]-execute(values);

  ...

}


Ronald



RE: doubt

2002-09-04 Thread Agarwal, Ramakant

Hi,

 I have some stored procedure/function in oracle and it returns the result
through ref cursor. I want to know if we can use perl scripts to invoke this
procedure and get the result using ref cursor. Can you please help??


Thanks,
Ramakant





RE: doubt

2002-09-03 Thread Mayes, Iman

Place the disconnect from the database and any other cleanup inside of an END{} 
subroutine. If you need more info, check regular PERL documentation (specifically for 
END).

Hope this helps.

Iman

-Original Message-
From: Agarwal, Ramakant [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 11:02 AM
To: '[EMAIL PROTECTED]'
Subject: doubt


Hi all,

I require your help regarding the following

I have a perl script which is connecting to an Oracle database and is
executing different queries. I am using Oraperl for executing different
queries. I want that if someone kills the process while the script is in
execution then it should log off from the database and then should exit.
Does the log off from the db happen automatically whenever a process is
killed or we do need to explicitly handle this?

Thanks,
Ramakant




doubt

2002-09-02 Thread Agarwal, Ramakant

Hi all,

I require your help regarding the following

I have a perl script which is connecting to an Oracle database and is
executing different queries. I am using Oraperl for executing different
queries. I want that if someone kills the process while the script is in
execution then it should log off from the database and then should exit.
Does the log off from the db happen automatically whenever a process is
killed or we do need to explicitly handle this?

Thanks,
Ramakant




Re: doubt

2002-09-02 Thread Bart Lateur

On Mon, 2 Sep 2002 20:32:28 +0530 , Agarwal, Ramakant wrote:

 I want that if someone kills the process while the script is in
execution then it should log off from the database and then should exit.
Does the log off from the db happen automatically whenever a process is
killed or we do need to explicitly handle this?

I suspect the latter. You can do that by doing

END {
$dbh-disconnect if $dbh;
}

where $dbh is the DBI database handle. A code block like this will
always be executed at the end of the program run, even if it happens by
a gentle signal, the equivalent of ctrl-C.

-- 
Bart.