RE: [Patch] RE: DBD-ODBC 0.28 for Cygwin

2001-08-22 Thread Neil Lunn

-Original Message-
From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 6:27 AM
To: Neil Lunn; 'Timothy C. Phan'; [EMAIL PROTECTED]
Subject: RE: [Patch] RE: DBD-ODBC 0.28 for Cygwin


Neil,

To confirm: you don't need the readme.cygwin anymore?

That should be right. I just checked out you candidate release and all tests
pass like a charm. That's with Acces and MS SQL Server drivers.


--Neil


Thanks,

Jeff

 -Original Message-
 From: Neil Lunn [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 06, 2001 8:41 PM
 To: 'Timothy C. Phan'; [EMAIL PROTECTED]
 Subject: [Patch] RE: DBD-ODBC 0.28 for Cygwin



 -Original Message-
 From: Timothy C. Phan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 07, 2001 6:20 AM
 To: [EMAIL PROTECTED]
 Subject: RE: DBD-ODBC 0.28 for Cygwin
 
 
 Hi,
 
   I'm actually using ActiveState Perl for a couple of years now.
   I, however, wanted to try diff version specially the one from
   Cygwin because I like the way Cygwin perl uses it own libraries
   instead of MS libs.
 
   I tried to build the DBD-ODBC and got a lot of compiler problem
   with the header files from the w32api packages.  Mainly in sql.h
   sqlext.h...

 There is a patch posted to both the DBI and Cygwin archives 
for this but
 since things have changed (location of w32api files) here is 
a new patch
 release. This applies against a clean DBD-ODBC-0.28 distribution.

 From a directory containing both DBD-ODBC-0.28.tar.gz and
 DBD-ODBC-0.28.1.patch files:

 tar zxvf DBD-ODBC-0.28.tar.gz
 cd DBD-ODBC-0.28
 patch -p1../DBD-ODBC-0.28.1.patch
 export DBI_DSN=[my test dsn here]
 perl Makefile.PL
 make
 make test
 mak install


 --Neil

 
   Here is the error print:
 
 ---
 gcc -c -I. -I/usr/lib/perl5/site_perl/5.6.1/cygwin/auto/DBI
 -DPERL_USE_SAFE_
 PUTE
 NV -DHAS_SBRK_PROTO -fno-strict-aliasing -DUSEIMPORTLIB -O2
 -DVERSION=\0.
 28\
  -DXS_VERSION=\0.28\  -I/usr/lib/perl5/5.6.1/cygwin/CORE
 -I/usr/include
 ODBC.c
 
 In file included from /usr/include/w32api/sql.h:9,
  from dbdodbc.h:6,
  from ODBC.h:9,
  from ODBC.xs:1:
 /usr/include/w32api/sqltypes.h:13: parse error before `UDWORD'
 /usr/include/w32api/sqltypes.h:13: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:14: parse error before `UWORD'
 /usr/include/w32api/sqltypes.h:14: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:20: parse error before `PTR'
 /usr/include/w32api/sqltypes.h:20: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:21: parse error before `HENV'
 /usr/include/w32api/sqltypes.h:21: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:22: parse error before `HDBC'
 /usr/include/w32api/sqltypes.h:22: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:23: parse error before `HSTMT'
 /usr/include/w32api/sqltypes.h:23: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:25: parse error before `SQLCHAR'
 /usr/include/w32api/sqltypes.h:25: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:30: parse error before `SQLUINTEGER'
 /usr/include/w32api/sqltypes.h:30: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:32: parse error before `SQLUSMALLINT'
 /usr/include/w32api/sqltypes.h:32: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:33: parse error before `SQLPOINTER'
 /usr/include/w32api/sqltypes.h:33: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:46: parse error before `SQLHWND'
 /usr/include/w32api/sqltypes.h:46: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:47: parse error before `BOOKMARK'
 /usr/include/w32api/sqltypes.h:47: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:67: parse error before `SQLTCHAR'
 /usr/include/w32api/sqltypes.h:67: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:80: parse error before `SQLBIGINT'
 /usr/include/w32api/sqltypes.h:80: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:81: parse error before `SQLUBIGINT'
 /usr/include/w32api/sqltypes.h:81: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:86: parse error before `SQLUSMALLINT'
 /usr/include/w32api/sqltypes.h:86: warning: no semicolon at
 end of struct or
 union
 /usr/include/w32api/sqltypes.h:87: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:88: warning: data definition
 has no type or
 storage class
 /usr/include/w32api/sqltypes.h:90: parse error before `SQLUSMALLINT'
 /usr/include/w32api

RE: ODBC quesions on WinNT.

2001-08-21 Thread Neil Lunn


Terry,

I am going to answer your question in the braod strokes rather than in the
context of you message as this seems to have a need to be said.

There seems to be a gross misunderstanding in the community in general of
what exactly ODBC and therefore DBD::ODBC is.

Questions like this frequently pop up about the Capabilities of DBD::ODBC
in communicating with remote hosts etc. This has nothing to do with ODBC
persay, but is actually a capabillity of the driver.

ODBC is a standard call level interface, that is a means for sending and
recieving the instructions to the database. This is done by the means of
implementing a driver to actually do the database communication, where ODBC
is the standardised layer. Point being that you should be able to write
your application, change the underlying driver and connection and have the
same program work against another vendors database.

So when you ask does DBD::ODBC have any means for remote communication you
should really be asking that question of the ODBC driver you are using.

The standard ODBC driver for MS SQL server communicates between different
machines. It is merely a matter of setting up the DSN or the connection
string correctly on the client. If you wish to connect to your SQL Server
from a Unix platform you are going to require a driver (ODBC or DBD) that
will support this from the client. Mostly these are commercially available
for ODBC or you can live on the wild side with something like FreeTDS.

If you only have a windows driver and don't want to get another driver for
the remote connection then you best look at the examples for DBD::Proxy.

--Neil


-Original Message-
From: Terry Witherspoon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 6:55 AM
To: [EMAIL PROTECTED]
Subject: ODBC quesions on WinNT.



Hi,

Several years ago I wrote some code making sql connections
from the web server on an NT box to SQL server on the same
machine. Now I'd like to have the webserver and sqlserver on
separate hosts. I've looked around and tried to add the
correct additions to dbi:ODBC and cannot get far without
the 'Invalid string or buffer length message' on my
DBI-connect attempts. I'm confused by references I've
seen on dbi webpages and have the following questions.
Looking at my hub it looks like this is an error because
I never see traffic between sqlserver and IIS.

Is it possible to make a remote tcp connection only with dbi:ODBC?
How about web server access from unix. The table of contents
in the dbi/dbd faq show examples using DBI::proxy, the 
openlink software and 
UnixODBC. These references all state 'How to access
a MS database from unix'. Does this software server some
basic function requiring it's use for ODBC connections? If
so there is there any place describing why you would choose
one method over another? TIA, tw

_
Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Remote DB Connection

2001-08-20 Thread Neil Lunn

-Original Message-
From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 18, 2001 1:02 AM
To: '[EMAIL PROTECTED]'
Subject: Remote DB Connection


How I can connect to a remote Informix database ? 

The database from which I would like to extract
data (a simple SQL select ...) is installed on a remote 
machine(Solaris 8).

The local machine is also a Sun machine using Solaris 8. I don't have
an Informix database installed on this local machine.

Can you provide me an exemple of code ?

Should I use RPC,Socket and stuff like that ?

perldoc dbiproxy
perldoc DBD::Proxy

--Neil


I have the intention to use DBD::ODBC module instead of DBD::Informix

José.



 DISCLAIMER 

 This e-mail and any attachment thereto may contain 
information which is confidential and/or protected by 
intellectual property rights and are intended for the sole use 
of the recipient(s) named above. 
 Any use of the information contained herein (including, 
but not limited to, total or partial reproduction, 
communication or distribution in any form) by other persons 
than the designated recipient(s) is prohibited. 
 If you have received this e-mail in error, please notify 
the sender either by telephone or by e-mail and delete the 
material from any computer.

 Thank you for your cooperation.

For further information about Proximus mobile phone services 
please see our website at http://www.proximus.be or refer to 
any Proximus agent.


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: DBI 1.18 problems

2001-08-20 Thread Neil Lunn

Allen,

It might help if you told people which version of perl you were using and
for which platform.

It seems like you statements though at least say something. You should never
run test.pl.
What you should be doing is:

perl Makefile.PL
make
make test
make install

as per the standard perl module build instructions. 

I would hazzard a guess that you are trying to manually install the files
from the Archives into your perl library tree. Please read the README file
included with the distribution.

--Neil

P.S Please do not post HTML mail to the mailing list.


  -Original Message-
 From: Wilson, Allen [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, August 21, 2001 8:22 AM
 To:   [EMAIL PROTECTED]
 Subject:  DBI 1.18 problems
 
Could any provide any assistance
 
 I am trying to upgrade my DBI to 1.18 and I kept getting the
 following error when I run  test.pl:
 
 DBI object version 1.08 does not match $DBI::Version 1.18 at 
 (a path that points to DynaLoader.pm) at line 185.
 
 When I took at look at the DynaLoader...the comments said this
 may not be the actual location of the error because it is the last
 placed referred to and the error is returning to the point.
 
 Does anyone recognize this and could provide me with some assistance.
 Thanks

 Allen Wilson
 http://research/kb/devforum

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Wildcards

2001-08-17 Thread Neil Lunn


-Original Message-
From: Clinton [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 3:50 PM
To: [EMAIL PROTECTED]
Subject: Re: Wildcards


Thanks for the response Neil.
It did in 97. I think this has changed in Access2000. I tried 
'A%' via Perl
and directly both with no success.

Sorry. Didn't type the whole thing. Should be like 'A%'.
  
That's the general syntax for what you are doing. Otherwise there might be
an error being generated, though this is probably the cause you should use {
RaiseError = 1} in the attributes of your database connection.

--Neil


Regards
CCJ
- Original Message -
From: Neil Lunn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 3:25 PM
Subject: RE: Wildcards


 -Original Message-
 From: Clinton [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 3:11 PM
 To: [EMAIL PROTECTED]
 Subject: Wildcards
 
 
 My problem is if I run the query from perl I get no response -
 the program
 runs to completion with no errors (using strict and w).
 
 my $sql = SELECT custID, ac_name, ac_address FROM tblAccount
 WHERE ac_state
 = 'VICTORIA' AND ac_name =  'A*' ORDER BY ac_name;
 = 'VICTORIA' AND ac_name =  'A%' ORDER BY ac_name;

 The Access ODBC driver uses '%' instead just like SQL Server.

 --Neil

 
___
___
 Please Note :
 Only  the intended recipient is authorised to access or use 
this e-mail.
 If you are not the intended recipient, please delete this e-mail and
notify
 the sender immediately. The contents of this e-mail are the writer's
 opinion and are not necessarily endorsed by the Gunz Companies
 unless expressly stated.

 We use virus scanning software but exclude all liability for 
viruses or
 similar in any attachment.




__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Sybase.dll Load Error

2001-08-16 Thread Neil Lunn

That's the fourth time. Enough is enough. Stop posting this. Someone will
answer [maybe] in their own time.

Perhaps you may think that prodding a tiger with a stick is also a wise
thing to do?

--Neil

-Original Message-
From: Falk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 5:07 PM
To: [EMAIL PROTECTED]
Subject: Sybase.dll Load Error


Hi,
I used to use DBD:Oracle and it worked fine.
I'm using ActivePerl 5.6.1.
Now I switched to DBD:Sybase. I installed the Sybase module via
ActiveState
ppm.
So far ok.
When I tried to execute a perl script connecting to a sybase db I get
the following error:
install_driver(Sybase) failed_ Can't load
'd:/perl/site/lib/auto/DBD/Sybase.dll' for module DBD::Sybase: 
load_file:
The module was not found at d:/perl/lib/DynaLoader.pm line 
206. at (eval)
line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where 
expected at
db_sybase.pl line 3.

P.S. Sybase.dll has automatically been installed by ppm at
d:\perl\site\lib\auto\DBD\Sybase\Sybase.dll

Thanks very much
Falk


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Database connection

2001-08-15 Thread Neil Lunn

-Original Message-
From: gopinath r [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 4:52 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Database connection


Hello

I have some doubts about connecting oracle 8.4
database from perl 5

I installed Indigoperl(perl 5) in widows NT system.The
directory G:/Indigoperl/site/lib contains DBI.pm
if i try to connect to database ,it showing error

Can't locate DBI.pm in @INC (@INC contains:
G:/Perl/lib G:/Perl/site/lib .) at dbtest.pl line 3.
BEGIN failed--compilation aborted at dbtest.pl line
3.

I want some clear explaination about how to connect to
oracle database using perl 5 in windows NT.Is it
necessary to download any other package 

I Would suggest searching the archives for this list and looking at the
included documentation for DBI for starters.

It would seem that you have not correctly installed DBI which is not just a
matter of copying DBI.pm to a location. Look at the README file in the DBI
distribution for clear instructions.


reply me ASAP
Thanks $ Regards
gopi

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! 
Messenger
http://phonecard.yahoo.com/


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: SQL Statement - Selecting details if they exist if not...

2001-08-14 Thread Neil Lunn


-Original Message-
From: Jon Barker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 8:28 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: SQL Statement - Selecting details if they exist if not... 



I'm not completely sure I understand you but:-

select * from Jobs left outer join Users on Jobs.JobID=Users.JobID;

Should give all the jobs, with null user data where there isn't a 
user associated with a job.

Actually that will give all job records regardless of whether there is a
matching JobID in the Users table or not. Depending on the Application a
LastViewedDate would only have a value if a record existed.

From the case presented LastViewedDate would be filtered anyway, as there
would seem to be the possibility that there *could* be more than one
UserName per JobId, even when selecting only one user. I must admit that I
don't get the structure of this.

--Neil



Jon

 Hiya all,
 
 I have (for illustration purposes) two tables in an ODBC database:
  Table 'Jobs'=JobID,JobDescription,JobDate
  Table 'Users'=UserName,JobID,LastViewedDate
 
 Basically I want to select all JobID's and JobDescriptions from Jobs
 where the user has a 'lastvieweddate' within the last 10 days.
 
 That bit I can work out - the problem is, is if there isn't an entry
 in the 'Users' table for a particular JobID. I could include 
nulls for
 the UserName for each jobid in the Users table and have an 
SQL statement in
 the format:
  ...AND (Users.UserName='' OR Users.UserName='John Doe')...
 
 But that may give me two records - which I don't really want. I could
 temporarily store the duplicates in a Perl array or hash and remove
 duplicates that way, but I would prefer a 'pure' SQL solution.
 
 Therefore, the question is:
  * Is there any way of SELECTing Jobs.JobID, Jobs.JobDescription, and
Jobs.JobDate with Users.LastViewedDate if the UserName is found in
the Users table complete with the corresponding JobID. If there
isn't a Users.UserName.Users.JobID=Jobs.JobID entry, still return
the Jobs.JobID, Jobs.JobDescription and Jobs.JobDate details.
 
 Many thanks,
 Richy C.
 [speaking personally]
 --
 Richard Chiswell, Systems Developer.
 Cradley Print Group.
 All opinions and comments expressed are NOT necessarily 
those of the Cradley
 Print.
 
 
 -- 
 The information contained within this e-mail sent by Cradley 
Print Ltd. is
 confidential and is intended for the named recipient only. 
If you are not
 the intended recipient please notify us by telephone 
immediately on 01384
 414100 (UK)or +(44)1384 414100 (International) or return it 
to us by e-mail
 quoting the name of the sender and the addressee. Please 
then delete it from
 your system.
 
 Encryption and Viruses
 ==
 Please note that this e-mail and any attachments have not 
been encrypted.
 They may therefore be liable to be compromised. Please also 
note that it is
 your responsibility to scan this e-mail and any attachments 
for viruses.
 Viruses and compromises of security are inherent risks in relation to
 e-mail.
 
 We do not, to the extent permitted by law, accept any 
liability (whether in
 contract, negligence or otherwise) for any virus infection 
and/or external
 compromise of security and/or confidentiality in relation to 
transmissions
 sent by e-mail.
 
 Contracts
 
 Please note, that contracts may NOT be concluded on behalf 
of Cradley Print 
 Ltd by e-mail, but contracts on behalf of our clients may be 
concluded by 
 e-mail.
 



__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Removing duplicate records - OT

2001-08-14 Thread Neil Lunn

-Original Message-
From: Bart Lateur [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 8:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Removing duplicate records - OT


On Tue, 14 Aug 2001 11:12:23 +1000, Neil Lunn wrote:

Use something like this as the record source for items with 
duplicate email
addresses:

select *
from table
where email in (
  select email
  from table
  group by email
  having count(*)  1)

and delete every second record.

Next question: how do you delete every second record? Quickly?

$count = 0;
while ($sth-fetch) { # or whatever

   $count++;
   if ($count  1) {
   # delete statement here for Id = current Id
   $count = 0;
   }
   # Otherwise skip over it
}

I wasn't going to write all the code and I can't be quick when I'm not here.

--Neil


-- 
   Bart.


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Removing duplicate records - OT

2001-08-13 Thread Neil Lunn

While I can read that the person who posted this message has solved their
issue, this might be worthwhile still.

One thing I notice is that all responses are processing very record to see
if a duplicate record is there. Hopefully though the database server is a
little more powerful than the machine running the script so why not do the
hash match there?

Use something like this as the record source for items with duplicate email
addresses:

select *
from table
where email in (
  select email
  from table
  group by email
  having count(*)  1)

and delete every second record.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 12, 2001 10:49 PM
To: [EMAIL PROTECTED]
Subject: Removing duplicate records - OT


Hello all,

Sorry about the off-topic question, but this has been driving 
me nuts. I am
trying to import a tab delimited file into a MySQL database 
and need to remove
duplicate email addresses, before importing the data. The file 
is setup like
this:

id1  user1  pass1  email1  name1  na  1  na
id2  user2  pass2  email2  name2  na  0  na
id3  user3  pass3  email2  name3  na  1  na
id4  user4  pass4  email   name4  na  1  na
etc
now I need to go thru each data record in the file and remove 
all duplicate
records where the email address is the same. IE above, id2 has 
the same email
address and id3 so I want to remove id3.. and so on. the file 
is sorted by the
id value.

Any help much appreciated.


Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: ActivePerl DBI Setup

2001-08-10 Thread Neil Lunn


-Original Message-
From: Falk [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 10, 2001 6:15 PM
To: [EMAIL PROTECTED]
Subject: ActivePerl DBI Setup


Hi,
I'm using Active Perl on WinNT.
I tried to setup the DBI Module - so far without success. I tried make,
nmake, ppm.
None of them works.
PPM tells me it misses a ppd file.

You are connected to the internet when using ppm right? Only a network
problem should stop this from working. Otherwise you will have to be
specific about the error and ActiveState should be the first people you
contact about any problem here. There is plently of documentation and FAQ's
on ppm on their site.

--Neil


Has anyone experience with ActivePerl on NT ?

Thanks a lot.
Falk


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: [Patch] RE: DBD-ODBC 0.28 for Cygwin

2001-08-08 Thread Neil Lunn


-Original Message-
From: Tim Bunce [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 8:58 PM
To: Neil Lunn
Cc: 'Timothy C. Phan'; [EMAIL PROTECTED]; Jeff Urlwin
Subject: Re: [Patch] RE: DBD-ODBC 0.28 for Cygwin


Can't the (intended) error be silenced by the test script?

Sorry, wrong word to use. How about a very lazy patch implementation.

Actually Tim this *now* happens because RaiseError also sets PrintError.
Simple to fix though as the test script simply needs to explicitly set
PrintError to false.

--Neil


Tim.

On Wed, Aug 08, 2001 at 12:24:58PM +1000, Neil Lunn wrote:
   I have this problem during 'make test'.  Is it good/bad? Thanks
 
 t/02simple..ok 7/14DBD::ODBC::st fetchrow failed: 
 [Microsoft][ODBC
 Micro
 soft Access Driver]String data, right truncated on column 
number 2 (C)
 (SQL-0100
 4)(DBD: st_fetch/SQLFetch (long truncated) err=1) at 
 t/02simple.t line 222.
 t/02simple..ok
 
 Yes that's a little anoying I know. The failure is actually 
intended by the
 test and as the last line shows all tests complete successfully.
 
 
___
___
 Please Note :
 Only  the intended recipient is authorised to access or use 
this e-mail.
 If you are not the intended recipient, please delete this 
e-mail and notify
 the sender immediately. The contents of this e-mail are the writer's 
 opinion and are not necessarily endorsed by the Gunz Companies
 unless expressly stated.
 
 We use virus scanning software but exclude all liability for 
viruses or
 similar in any attachment.
 
 


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Can't locate DBD/Oracle.pm

2001-08-08 Thread Neil Lunn



-Original Message-
From: Veeresh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 2:36 PM
To: [EMAIL PROTECTED]
Subject: Can't locate DBD/Oracle.pm 


Hi All,
I'm using the Oracle 8.1.6 version. I was trying to run the 
Perl script i got this error.

install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in 


Below isn't very promising

Failed Test  Status Wstat Total Fail  Failed  List of failed
---

t/base.t  1   256 52  40,00%  4-5
t/general.t   1   256??   ??   %  ??
t/long.t  1   256??   ??   %  ??
t/plsql.t 1   256??   ??   %  ??
1 test skipped.
Failed 4/5 test scripts, 20.00% okay. 2/5 subtests failed, 60.00% okay.
make: *** [test_dynamic] Error 29


this is th eresult of  
make perl
 ^

You do realise that you are trying to statically link this module with perl
don't you? By the directories that you have listed in @INC It doesn't seem
really clear as to what you are doing. Are you trying to store these modules
independantly of the perl installation? If so, then why the static linking?

If you could explain these points and also include the output of perl -V so
people can see how your perl is built, I think you would get a lot closer to
solving your problem.

--Neil


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Exporting Data

2001-08-07 Thread Neil Lunn


Hmm. Not really a DBI question but I feel charitable. Beside this might stop
people asking in the future. See the code below.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 12:50 PM
To: [EMAIL PROTECTED]
Subject: Exporting Data


Hello,

I'm trying come up with a fast and easy way to export all the 
data from a table
into a file, tab delimited, but haven't alot of success with this. 

What is the best way to pull all the data from a table, then 
put into a text
file and have it tab delimited for each column value:

$query = qq|select * from orders|;
$sth = $dbh-prepare($query);
$sth-execute();

open(FILE,$export_file);
while(my @rows = $sth-fetchrow_array()) {
# THIS IS WHERE I SEEM TO LOOSE IT

#Instead of this
#print FILE @rows . '\t;
print FILE join(\t,@rows) .\n;



}
close (FILE)

I get each row into the file, but can't get the tab delimited 
between each
column value properly and have a \n newline at the end of each @rows

Sorry for the basic question, but something is eluding me on this??

THX's
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Can't locate loadable object for module DBI

2001-08-07 Thread Neil Lunn


-Original Message-
From: Veeresh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 2:07 AM
To: [EMAIL PROTECTED]
Subject: Can't locate loadable object for module DBI 


Then I installed the DBI.pm as per instructions in the 
website.The following
 is the result 

Can't locate loadable object for module DBI in @INC (@INC 
contains: /opt/apps/portal/pin16/opt/portal/6.0/lib 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/sun4-solaris/5.
00503 /opt/apps/portal/pin16/opt/portal/6.0/lib/perl5 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19 
/opt/portal/6.0/lib/perl5/sun4-solaris/5.00503 
/opt/portal/6.0/lib/perl5 
/opt/portal/6.0/lib/perl5/site_perl/sun4-solaris 
/opt/portal/6.0/lib .) at 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm
 

Yikes! I'd like to know where these instructions you describe are so they
could be burnt. The only instructions you should be following are included
with the DBI package in the README (but why don't people do that?) file.



Build/Install instructions:

tar zxvf DVB-x.xx.tar.gz
cd DBI-x.xx
perl Makefile.PL
make
make test
make install





BEGIN failed--compilation aborted at 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm
 line 185.
BEGIN failed--compilation aborted at cust.pl line 7.

I appreciate if anybody suggest solution.

Thanks in advance.

Regards,
Veers.


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





[Patch] RE: DBD-ODBC 0.28 for Cygwin

2001-08-06 Thread Neil Lunn


-Original Message-
From: Timothy C. Phan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 6:20 AM
To: [EMAIL PROTECTED]
Subject: RE: DBD-ODBC 0.28 for Cygwin


Hi,

  I'm actually using ActiveState Perl for a couple of years now.
  I, however, wanted to try diff version specially the one from
  Cygwin because I like the way Cygwin perl uses it own libraries
  instead of MS libs.

  I tried to build the DBD-ODBC and got a lot of compiler problem
  with the header files from the w32api packages.  Mainly in sql.h
  sqlext.h...

There is a patch posted to both the DBI and Cygwin archives for this but
since things have changed (location of w32api files) here is a new patch
release. This applies against a clean DBD-ODBC-0.28 distribution.

From a directory containing both DBD-ODBC-0.28.tar.gz and
DBD-ODBC-0.28.1.patch files:

tar zxvf DBD-ODBC-0.28.tar.gz
cd DBD-ODBC-0.28
patch -p1../DBD-ODBC-0.28.1.patch
export DBI_DSN=[my test dsn here]
perl Makefile.PL
make
make test
mak install


--Neil


  Here is the error print:

---
gcc -c -I. -I/usr/lib/perl5/site_perl/5.6.1/cygwin/auto/DBI 
-DPERL_USE_SAFE_
PUTE
NV -DHAS_SBRK_PROTO -fno-strict-aliasing -DUSEIMPORTLIB -O2   
-DVERSION=\0.
28\
 -DXS_VERSION=\0.28\  -I/usr/lib/perl5/5.6.1/cygwin/CORE 
-I/usr/include
ODBC.c

In file included from /usr/include/w32api/sql.h:9,
 from dbdodbc.h:6,
 from ODBC.h:9,
 from ODBC.xs:1:
/usr/include/w32api/sqltypes.h:13: parse error before `UDWORD'
/usr/include/w32api/sqltypes.h:13: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:14: parse error before `UWORD'
/usr/include/w32api/sqltypes.h:14: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:20: parse error before `PTR'
/usr/include/w32api/sqltypes.h:20: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:21: parse error before `HENV'
/usr/include/w32api/sqltypes.h:21: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:22: parse error before `HDBC'
/usr/include/w32api/sqltypes.h:22: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:23: parse error before `HSTMT'
/usr/include/w32api/sqltypes.h:23: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:25: parse error before `SQLCHAR'
/usr/include/w32api/sqltypes.h:25: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:30: parse error before `SQLUINTEGER'
/usr/include/w32api/sqltypes.h:30: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:32: parse error before `SQLUSMALLINT'
/usr/include/w32api/sqltypes.h:32: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:33: parse error before `SQLPOINTER'
/usr/include/w32api/sqltypes.h:33: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:46: parse error before `SQLHWND'
/usr/include/w32api/sqltypes.h:46: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:47: parse error before `BOOKMARK'
/usr/include/w32api/sqltypes.h:47: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:67: parse error before `SQLTCHAR'
/usr/include/w32api/sqltypes.h:67: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:80: parse error before `SQLBIGINT'
/usr/include/w32api/sqltypes.h:80: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:81: parse error before `SQLUBIGINT'
/usr/include/w32api/sqltypes.h:81: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:86: parse error before `SQLUSMALLINT'
/usr/include/w32api/sqltypes.h:86: warning: no semicolon at 
end of struct or
union
/usr/include/w32api/sqltypes.h:87: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:88: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:90: parse error before `SQLUSMALLINT'
/usr/include/w32api/sqltypes.h:90: warning: no semicolon at 
end of struct or
union
/usr/include/w32api/sqltypes.h:91: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:92: parse error before `second'
/usr/include/w32api/sqltypes.h:92: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:93: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:96: parse error before `SQLUSMALLINT'
/usr/include/w32api/sqltypes.h:96: warning: no semicolon at 
end of struct or
union
/usr/include/w32api/sqltypes.h:97: warning: data definition 
has no type or
storage class
/usr/include/w32api/sqltypes.h:98: parse error before `hour'
/usr/include/w32api/sqltypes.h:98: warning: data 

RE: Turning autocommit off

2001-08-06 Thread Neil Lunn

-Original Message-
From: Jonathan Leffler [mailto:[EMAIL PROTECTED]]

Neil Lunn wrote:

 It's off by defualt. But the documentation should help more here.

Are you sure?  I think you'll find it is on by default, 
because that's the only
mode that all databases, even databases without transactions 
(eg DBD::CSV,
unlogged Informix databases, older versions of MySQL, etc), 
can support.

Yes, usually this is the case but not *all* databases support transactions.
I was thinking that there was an issue where the ODBC spec had transactions
off by default and that was followed by DBI. In fact from the documentation:

   Drivers should always default to AutoCommit mode (an
   unfortunate choice largely forced on the DBI by ODBC
   and JDBC conventions.)

So are any drivers not doing this? I always explicitly set AutoCommit = 0
when I want transactions enforced.

--Neil


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Perl.exe generating errors when used on Win 2K

2001-08-05 Thread Neil Lunn


Yes. While the soolution below is correct it might help to tell the person
who oringally posted this question why they where getting an error.

The difference is in:

$sth = $dbh-do(insert 
$sth-bind_param( ...

and

$sth = $dbh-prepare(insert
$sth-bind_param( ...

Essentially the previous code is trying to bind an input paramter to a
statement that is already executing and therefore is an error.

The RaiseError attribute should be set when in doubt about where and error
is coming from and you can always use DBI-trace.

--Neil


$insert_sql = EOT
Insert into ofas
(company,time,region,lineitem,actual,actualus)
values (?,?,?,?,?,?)
EOT

$sth = $dbh-prepare($insert_sql) || die $dbh-errstr;

while ($line = tmptestper) {

   # your unpack and other stuff here


   $sth-bind_param(1,$company);
   $sth-bind_param(2,$year);
   $sth-bind_param(3,$region);
   $sth-bind_param(4,$lineitem);
   $sth-bind_param(5,$actual);
   $sth-bind_param(6,$actualus);
   $sth-execute || die $sth-errstr;

   $dbh-commit;  # autocommit on?
}


- Original Message - 
From: Anurag Minocha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 9:48 AM
Subject: Perl.exe generating errors when used on Win 2K


 
 Hi,
 I have Perl installed on my windows 2000 machine but when I 
execute a perl
 dbi script windows gives me a program error.
 
 Here is the error
 Perl.exe has generated errors and will be closed by windows. 
You will need
 to restart the program. An error log is being created.
 
 Here is the script I am trying to execute
 
 #! c:\perl\bin 
 use dbi;
 
 my $dbh =
 DBI-connect(dbi:Oracle:local_orcl8i,localcompany,localcompany)
 or die Can't Connect to Oracle Database $DBI::errstr\n;
 
 
 open (tmptestperl , testperl.txt) or die Cant Open 
testperl.txt \n;
 
 while ($line = tmptestperl) {
 ($company,$year,$region,$lineitem,$actual,$actualus) =
 unpack(A10 X A10 X A10 X A15 X A20 X A*, $line);
 
 $actual =~ s/,//g;
 $actual =~ s/NA//;
 
 $actualus =~ s/,//g;
 $actualus =~ s/NA//;
 
 $sth = 
 $dbh-do( Insert into ofas
 (company,time,region,lineitem,actual,actualus)
 values (?,?,?,?,?,?));
 
 $sth-bind_param(1,$company);
 $sth-bind_param(1,$year);
 $sth-bind_param(1,$region);
 $sth-bind_param(1,$lineitem);
 $sth-bind_param(1,$actual);
 $sth-bind_param(1,$actualus);
 
 
 print $actual \n;
 
 
 
 }
 
 This script was working fine insert and bind variable 
statements. i.e when I
 wasnt trying to insert into the database.
 
 Please Suggest something
 
 Thanks
 Anurag
 


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: fetchall_arrayref

2001-08-03 Thread Neil Lunn


If I use something like:
my $data= $sth-fetchall_arrayref;
 foreach (@$data){  
 print qq(@$_BR);
 }
 
 
I get all the data, but how the hell do I access the specific 
elements in
this array of arrays?  Is there a better fetch method to use?  

my $data = $sth-fetchall_arrayref;

# Print Each element of each row per line separated by a space.
foreach my $row (@{$data}) {
foreach $element (@{$row}) {
print $element ;
}
print \n;
}

or

print $data-[2][3]\n;# print the 4th element of the third row.

or whatever slicing needs you want.

Have a look at perldoc perldsc for the data structure cookbook examples
which may lead you to look at other dbi methods to get the data structure
and processing you want.

--Neil


 
Thanks,
Eric
 
 


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: DBI on Win2k

2001-07-31 Thread Neil Lunn

Use ppm for ActiveState perl.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 3:34 PM
To: [EMAIL PROTECTED]
Subject: DBI on Win2k


Hi all,

I have installed ActivePerl on windows 2000 and want to 
install and configure DBI module.

After running perl MakeFile.pl, it requires to run make 

I think, make is for Linux platform and not for Windows. 
What should i need to run ?? 

If i require that utility to be downloaded from net, please 
also provide me the hyperlink.

Thanx in advance

Denis


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: :ODBC configuration of DSN within program.

2001-07-29 Thread Neil Lunn

Then use a dsnless connection. Look at perldoc DBD::ODBC for the examples
(connecting to Access) that are already listed.

--Neil

-Original Message-
From: Michael Blackmore [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 10:51 AM
To: [EMAIL PROTECTED]
Subject: DBI::ODBC configuration of DSN within program.


Dear Dbi-Users,

I have a number of MS Access databases (30+) that all have the same
structure.  I would like to configure my DSN so that it points 
to each of
these databases in turn, I can then extract the information I want.
Does anyone know if this is possible?  I don't really want to 
configure the
DSN for each database manually.

Cheers,

Michael


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: fetchall_hashref() - does/will it exist?

2001-07-15 Thread Neil Lunn

Check your installation. It is definately there.

--Neil

-Original Message-
From: Alex Algard [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 14, 2001 9:16 AM
To: [EMAIL PROTECTED]
Subject: fetchall_hashref() - does/will it exist?


I just downloaded DBI 1.18, and although the 
fetchall_hashref method is
mentioned in the documentation, it doesn't appear to exist in 
the code. Is
this is an oversight? In any case, will this method be 
included in the next
version of DBI, and if so, is that expected to be soon?

Thanks,
Alex Algard


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Problems installing DBI 1.14 on SunOS 5.6 (Solaris 2.6)

2001-07-13 Thread Neil Lunn

Looks like your make is broken. Get an update from your nearest mirror under
/pub/gnu

-Neil

-Original Message-
From: ARCS (Wade) [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 4:22 PM
To: [EMAIL PROTECTED]
Subject: Problems installing DBI 1.14 on SunOS 5.6 (Solaris 2.6)


Hello,

I am trying to get DBI 1.14 installed for client and have been
unsuccessful.
I'm really stuck between a rock and a hard place here, so any 
help would
be
greatly appreciated.  Would be willing to pay someone to get DBI and
DBD::mysql installed if anyone is interested.

Here are the results of the attempted installation:

---
-



# perl Makefile.PL
*** Note:
The optional PlRPC-modules (RPC::PlServer etc) are not installed.
If you want to use the DBD::Proxy driver and DBI::ProxyServer
modules, then you'll need to install the RPC::PlServer,
RPC::PlClient,
Storable and Net::Daemon modules. The CPAN Bundle::DBI may 
help you.
You can install them any time after installing the DBI.
You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
http://www.perl.com/CPAN/modules/by-module
http://www.perl.org/CPAN/modules/by-module
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module


Warning: I could not locate your pod2man program. Please make sure,
 your pod2man program is in your PATH before you execute 'make'

Writing Makefile for DBI

Remember to actually *read* the README file!
Use  'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.

# make
make: Warning: Can't find `default.mk': No such file or directory
/usr/bin/perl -I/usr/local/lib/perl5/sun4-solaris/5.00404 
-I/usr/local/l
ib/p
erl5 /usr/local/lib/perl5/ExtUtils/xsubpp  -typemap
/usr/local/lib/perl5/ExtUtils/typemap DBI.xs xstmp.c  mv xstmp.c
DBI.c
gcc -c  -I/usr/local/include -O -DVERSION=\1.14\  
-DXS_VERSION=\1
.14\
 -fpic -I/usr/local/lib/perl5/sun4-solaris/5.00404/CORE -Wall 
-Wno-comm
ent
-DDBI_NO_THREADS DBI.c
sh: gcc: not found
*** Error code 1
make: Fatal error: Command failed for target `DBI.o'

# make test
make: Warning: Can't find `default.mk': No such file or directory
/usr/bin/perl -I/usr/local/lib/perl5/sun4-solaris/5.00404 
-I/usr/local/l
ib/p
erl5 /usr/local/lib/perl5/ExtUtils/xsubpp  -typemap
/usr/local/lib/perl5/ExtUtils/typemap DBI.xs xstmp.c  mv xstmp.c
DBI.c
gcc -c  -I/usr/local/include -O -DVERSION=\1.14\  
-DXS_VERSION=\1
.14\
 -fpic -I/usr/local/lib/perl5/sun4-solaris/5.00404/CORE -Wall 
-Wno-comm
ent
-DDBI_NO_THREADS DBI.c
sh: gcc: not found
*** Error code 1
make: Fatal error: Command failed for target `DBI.o'

# make test TEST_VERBOSE=1
make: Warning: Can't find `default.mk': No such file or directory
/usr/bin/perl -I/usr/local/lib/perl5/sun4-solaris/5.00404 
-I/usr/local/l
ib/p
erl5 /usr/local/lib/perl5/ExtUtils/xsubpp  -typemap
/usr/local/lib/perl5/ExtUtils/typemap DBI.xs xstmp.c  mv xstmp.c
DBI.c
gcc -c  -I/usr/local/include -O -DVERSION=\1.14\  
-DXS_VERSION=\1
.14\
 -fpic -I/usr/local/lib/perl5/sun4-solaris/5.00404/CORE -Wall 
-Wno-comm
ent
-DDBI_NO_THREADS DBI.c
sh: gcc: not found
*** Error code 1
make: Fatal error: Command failed for target `DBI.o'

# make install
make: Warning: Can't find `default.mk': No such file or directory
/usr/bin/perl -I/usr/local/lib/perl5/sun4-solaris/5.00404 
-I/usr/local/l
ib/p
erl5 /usr/local/lib/perl5/ExtUtils/xsubpp  -typemap
/usr/local/lib/perl5/ExtUtils/typemap DBI.xs xstmp.c  mv xstmp.c
DBI.c
gcc -c  -I/usr/local/include -O -DVERSION=\1.14\  
-DXS_VERSION=\1
.14\
 -fpic -I/usr/local/lib/perl5/sun4-solaris/5.00404/CORE -Wall 
-Wno-comm
ent
-DDBI_NO_THREADS DBI.c
sh: gcc: not found
*** Error code 1
make: Fatal error: Command failed for target `DBI.o'

# perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
  Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris
uname='sunos 5.6 generic sun4u sparc sunw,ultra-1 '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=y useperlio=undef d_sfio=undef
  Compiler:
cc='gcc', optimize='-O', gccversion=2.8.1
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so
useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '

RE: Compile problems with DBD::ODBC

2001-07-12 Thread Neil Lunn


-Original Message-
From: Farouk Khawaja [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 7:09 AM
To: Sterin, Ilya; '[EMAIL PROTECTED] '
Subject: RE: Compile problems with DBD::ODBC


also, opt/odbc/lib is defined in LD_LIBRARY_PATH

Looks like the wrong driver manager. This should identify itself as the
intersolve driver manager, otherwise there is something wrong with your
configuration.

The default directories I get are /usr/sqlnk/{$VERSION} so unless you
deliberately overrode or moved this the driver manager should be here.

--Neil


 Sterin, Ilya [EMAIL PROTECTED] wrote:
 What is Merant is that the distributor of you ODBC 
for *NIX software.  Do
 you have third party ODBC libs installed.
 
 Ilya
 
 -Original Message-
 From: Farouk Khawaja
 To: [EMAIL PROTECTED]
 Sent: 7/12/01 2:50 PM
 Subject: Compile problems with DBD::ODBC
 
 
 Environment:
 Solaris 2.7
 Perl v5.6
 Dirver Manager: Merant
 DBI v1.18
 DBD-ODBC v0.28
 
 I'm having problems compiling DBD::ODBC.  DBI 
 compiled fine.  I'm sorry if this has been 
discussed 
 before, but I couldn't locate an answer.
 
 Below is the output from make.  make test 
complains 
 about a missing shared library.  I don't have 
 llibdbodbc.so anywhere on my system.
 
 Can someone tell if if this missing library is 
 *really* the problem or am I doing something 
wrong?  
 If the problem is this missing library, can someone 
 direct me to where I can find it?
 
 
  BEGIN COMPILE DUMP ###
 perl Makefile.PL
 Unrecognized escape \i passed through at 
Makefile.PL 
 line 217.
 
 Configuring DBD::ODBC ...
 
  Remember to actually *READ* the README file!
 And re-read it if you have any problems.
 
 Using DBI 1.18 installed in
 /usr/local/lib/perl5/site_perl/5.6.0/sun4-
 solaris/auto/DBI
 Using ODBC in /opt/odbc
 
 Umm, this looks like a unixodbc type of driver 
 manager.
 We expect to find the sql.h, sqlext.h and (which 
were
 supplied with unixODBC) in $ODBCHOME/include 
 directory alongside 
 
the /opt/odbc/lib/libdbodbc.so /opt/odbc/lib/liblsxodb
 c.so
 /opt/odbc/lib/libodbc.so /opt/odbc/lib/libodbcinst.s
o
 /opt/odbc/lib/llibdbodbc.so /opt/odbc/lib/odbccurs.s
o
 /opt/odbc/lib/odbctrac.so library. in $ODBCHOME/lib
 
 
 Checking if your kit is complete...
 Looks good
 Note (probably harmless): No library found for -
 llibdbodbc.so
 Using DBI 1.18 installed in
 /usr/local/lib/perl5/site_perl/5.6.0/sun4-
 solaris/auto/DBI
 Writing Makefile for DBD::ODBC
 
 The DBD::ODBC tests will use these values for the 
 database connection:
 DBI_DSN=dbi:ODBC:SUNODBCe.g. 
 dbi:ODBC:demo
 DBI_USER=xxx
 DBI_PASS=xxx
 
 make
 gcc -c -I. -
 I/usr/local/lib/perl5/site_perl/5.6.0/sun4-
 solaris/auto/DBI
 -fno-strict-aliasing -I/usr/local/include -
 D_LARGEFILE_SOURCE
 -D_FILE_OFFSET_BITS=64 -O -DVERSION=\0.28\ -
 DXS_VERSION=\0.28\
 -fPIC -I/usr/local/lib/perl5/5.6.0/sun4-
solaris/CORE -
 I/opt/odbc/include
 ODBC.c
 gcc -c -I. -
 I/usr/local/lib/perl5/site_perl/5.6.0/sun4-
 solaris/auto/DBI
 -fno-strict-aliasing -I/usr/local/include -
 D_LARGEFILE_SOURCE
 -D_FILE_OFFSET_BITS=64 -O -DVERSION=\0.28\ -
 DXS_VERSION=\0.28\
 -fPIC -I/usr/local/lib/perl5/5.6.0/sun4-
solaris/CORE -
 I/opt/odbc/include
 dbdimp.c
 Running Mkbootstrap for DBD::ODBC ()
 chmod 644 ODBC.bs
 LD_RUN_PATH= gcc -o 
 blib/arch/auto/DBD/ODBC/ODBC.so  -G
 -L/usr/local/lib ODBC.o dbdimp.o
 chmod 755 blib/arch/auto/DBD/ODBC/ODBC.so
 cp ODBC.bs blib/arch/auto/DBD/ODBC/ODBC.bs
 chmod 644 blib/arch/auto/DBD/ODBC/ODBC.bs
 Manifying blib/man3/DBD::ODBC.3
 
 make test TEST_VERBOSE=1
 PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib
 -I/usr/local/lib/perl5/5.6.0/sun4-solaris -
 I/usr/local/lib/perl5/5.6.0
 -e 'use Test::Harness qw(runtests $verbose); 
 $verbose=1; runtests
 @ARGV;' t/*.t
 t/01baseinstall_driver(ODBC) failed: 
 Can't load
 'blib/arch/auto/DBD/ODBC/ODBC.so' for module 
 DBD::ODBC: ld.so.1:
 /bin/perl: fatal: relocation error: file
 blib/arch/auto/DBD/ODBC/ODBC.so: symbol 
 SQLGetFunctions: referenced
 symbol not found at
 /usr/local/lib/perl5/5.6.0/sun4-
solaris/DynaLoader.pm 
 line 200.
  at (eval 1) line 3
 Compilation failed in require at (eval 1) line 3.
 Perhaps a required shared library or dll isn't 
 installed where expected
  at t/01base.t line 14
 1..5
 ok 1
 ok 2
 ok 3
 dubious
 Test returned status 255 (wstat 65280, 
0xff00)
 DIED. FAILED tests 4-5
 Failed 2/5 tests, 60.00% okay
 t/02simple..1..14
 ok 1
  Test 2: connecting to the database
 install_driver(ODBC) failed: Can't load
 'blib/arch/auto/DBD/ODBC/ODBC.so' for module 
 DBD::ODBC: ld.so.1:
 /bin/perl: fatal: relocation error: file
 blib/arch/auto/DBD/ODBC/ODBC.so: symbol 
 SQLGetFunctions: referenced
 symbol not found at
 /usr/local/lib/perl5/5.6.0/sun4-
solaris/DynaLoader.pm 
 line 200.
  at (eval 1) line 3
 Compilation failed in require at (eval 1) line 3.
 Perhaps a required shared library or dll isn't 
 

RE: Can't locate objrect method connect via package DBI

2001-07-05 Thread Neil Lunn


You will do better to post an example of your script, the actual error
message(s) received, and the output of perl -V, as is suggested in the
documentation.

You are running your script with -w aren't you!

--Neil

-Original Message-
From: anshuman das [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 6:12 PM
To: [EMAIL PROTECTED]
Subject: Can't locate objrect method connect via package DBI


Hi

I have upgraded my machine as following

RHLinux 6,.2 -- 7.0
PostgreSql 65. -- 7.0
Perl 5 --Perl 5.6

I have installed DBI  DBD again after the upgradation.
My problem is my old perl codes (which were running perfectly before
upgradation) uses connect are not running. It can't connect postgresql
databse through DBI. The error is ---
Can't locate objrect method connect via package DBI

I posted this letter earlier, somebody asked me wheather I 
used use DBI. THe 
answer yes, I mentioned that MY CODES WERE RUNNING PERFECTLY BEFORE 
UPGRADATION.

Please help.

Anshuman Das
[EMAIL PROTECTED]
___
__
Get Your Private, Free E-mail from MSN Hotmail at 
http://www.hotmail.com.

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: compiling error

2001-07-02 Thread Neil Lunn


Old Perl in your path!

/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503
^^^

-Original Message-
From: Deng Ruijie [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 4:23 PM
To: [EMAIL PROTECTED]
Subject: compiling error


Hi everybody,
Can I get your help?
gunziped the DBI module on my Sparc-Solaris 8 system. I've 
read  the README
file and followed the steps.  perl Makefile.PL ...OK. But when 
I do make,
tries to compile with gcc. Encountrered the following error messages.
===
% make
gcc -c   -xO3 -xdepend -DVERSION=\1.18\  
-DXS_VERSION=\1.18\ -KPIC -
I/uc
gcc: unrecognized option `-KPIC'
gcc: language depend not recognized
gcc: Perl.c: linker input file unused since linking not done
/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503
/usr/perl5/5.0c
gcc -c   -xO3 -xdepend -DVERSION=\1.18\  
-DXS_VERSION=\1.18\ -KPIC -
I/uc
gcc: unrecognized option `-KPIC'
gcc: language depend not recognized
gcc: DBI.c: linker input file unused since linking not done
LD_RUN_PATH= gcc -o blib/arch/auto/DBI/DBI.so  -G DBI.o
gcc: DBI.o: No such file or directory
gcc: No input files
*** Error code 1
make: Fatal error: Command failed for target 
`blib/arch/auto/DBI/DBI.so'
==

Note: (perl and gcc version infomation)
1) This is perl, version 5.005_03 built for sun4-solaris
Copyright 1987-1999, Larry Wall

2) gcc version 2.95.2 19991024 (release)

Thanks
Ruijie


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: compiling error

2001-07-02 Thread Neil Lunn


-Original Message-
From: Deng Ruijie [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 6:26 PM
To: [EMAIL PROTECTED]
Subject: RE: compiling error


Hi Neil Lunn,

Following is the output for 'perl -V':
# perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos localhost 5.8 sun4u sparc sunw,ultra-1 '
hint=previous, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-xO3 -xdepend', gccversion=
 ^^
Not built with gcc.

Someone has hacked this up in the past. If you have gcc (2.95.2 which you
have) you could do well to build and install your own perl. You will need to
be careful with what options you choose (prefix, previous perl, 5.005
compatibilty) but this isn't too dificult to work out.

Otherwise there should be gcc builds available or you can use a solaris
native compiler.

Good Luck!

--Neil

cppflags=''
ccflags =''
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
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R
/usr/perl5/5.0'
cccdlflags='-KPIC', lddlflags='-G'


Characteristics of this binary (from libperl):
  Built under solaris
  Compiled at Dec 22 1999 00:00:57
  @INC:
/usr/perl5/5.00503/sun4-solaris
/usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris
/usr/perl5/site_perl/5.005
.
#

-Original Message-
From: Neil Lunn [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 4:14 PM
To: 'Deng Ruijie'
Cc: '[EMAIL PROTECTED]'
Subject: RE: compiling error



My mistake actually, I confused your email with another I just read.
Something looks funny here though considering -KPIC as a gcc 
option that
doesn't exist.

Make is probably old and broken so I would upgrdade this. A 
straight guess
would say that you perl was not compiled on this machine. This 
will cause
you problems. If unsure about this send the full output of 
perl -V along
with your post to the list.

Upgrading perl is usually recommended anyway.

P.S. Please don't reply to me directly and use the list instead.

--Neil


-Original Message-
From: Deng Ruijie [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 5:49 PM
To: 'Neil Lunn'
Subject: RE: compiling error


Hi Neil Lunn,

Thank a lot for your promtp reply.

You mean the error will disappear if I install a newer 
version of perl?

Best regards,
Ruijie

-Original Message-
From: Neil Lunn [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 3:46 PM
To: [EMAIL PROTECTED]
Subject: RE: compiling error



Old Perl in your path!

/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503
^^^

-Original Message-
From: Deng Ruijie [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 4:23 PM
To: [EMAIL PROTECTED]
Subject: compiling error


Hi everybody,
Can I get your help?
gunziped the DBI module on my Sparc-Solaris 8 system. I've
read  the README
file and followed the steps.  perl Makefile.PL ...OK. But when
I do make,
tries to compile with gcc. Encountrered the following error messages.
===
% make
gcc -c   -xO3 -xdepend -DVERSION=\1.18\
-DXS_VERSION=\1.18\ -KPIC -
I/uc
gcc: unrecognized option `-KPIC'
gcc: language depend not recognized
gcc: Perl.c: linker input file unused since linking not done
/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503
/usr/perl5/5.0c
gcc -c   -xO3 -xdepend -DVERSION=\1.18\
-DXS_VERSION=\1.18\ -KPIC -
I/uc
gcc: unrecognized option `-KPIC'
gcc: language depend not recognized
gcc: DBI.c: linker input file unused since linking not done
LD_RUN_PATH= gcc -o blib/arch/auto/DBI/DBI.so  -G DBI.o
gcc: DBI.o: No such file or directory
gcc: No input files
*** Error code 1
make: Fatal error: Command failed for target
`blib/arch/auto/DBI/DBI.so'
==

Note: (perl and gcc version infomation)
1) This is perl, version 5.005_03 built for sun4-solaris
Copyright 1987-1999, Larry Wall

2) gcc version 2.95.2 19991024 (release)

Thanks
Ruijie


___
___
Please Note :
Only  the intended recipient is authorised to access or use
this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.
The contents
of this e-mail are the writer's
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly

RE: DBI Connect Failure

2001-06-24 Thread Neil Lunn


-Original Message-
From: Christine Kluka [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 23, 2001 1:29 AM
To: Rudy Lippan
Cc: Ronald J Kimball; Chase Michael A.; Neil Lunn; [EMAIL PROTECTED]
Subject: Re: DBI Connect Failure


Rudy, 

I'm studying the DBI module to get smarter on this.  I was not able to
complete installation on the Pg module (I have 
pg95perl5-1.2.0), because
 ^^
Don't know exactly what this is but it sure isn't anything to do with DBI

I couldn't find Pg.pm modules in the right places.  Tried to reinstall,
but it failed on make because libpq.so.1 is missing from
usr/local/pgsql/lib. Tried checking www.cpan.org today to make 

That's the Postrgress client interface module. Not part of Perl. Check your
Postgress installation, but the chances are that this file is actually
located elsewhere in your system than /usr/local.

As for CPAN, this is mirrored all around the world. You really should be
using the cpan shell with your nearest mirror. See the comments on perldoc
later.

sure that
I have the correct Pg module, but it was down.

So naturally the database connection for DBI/DBD::Pg failed, but at
least this time I connected to DBI.pm, w/ response can't locate
DBD/Pg.pm in @INC.

I have DBD installed, but I didn't set the environment variables for
DBI_DSN, DBI_USER, DBI_PASS and ODBCHOME when I installed it, 
and I only
know 2 out of the 4 anyway. Again, more studying.

That doesn't sound like DBD::Pg to me but more like DBD::ODBC.


I got no errors on the PgSQL.pm install, so it would be easier 
for me to
use that, presuming I can get DBD running correctly.  

Tried using perl documentation, but got only the usage index.  I can't
run perldoc, because I get a warning: Superuser must not run ~/perldoc
without security audit and taint checks.

You really should have your own account that is not root (or uid 0).Running
your shell as the superuser all day may not be a very safe idea. Perhaps you
should review your security settings and possibly use a utility such as
sudo.


I have a colleague who's betting this is a total waste of time, given
the ignorance I've just demonstrated.  But as long as I do the other
stuff I'm supposed to be doing, trying this out still beats learning MS
Access.

Thanks all of you for the tips!

Christine

Rudy Lippan wrote:
 
 Christine,
 
 
  However I still can't connect to my sample Postgres database.
 
 
 From the code you posted, it does not look like you are 
using DBI, but
 rather PgSQL. You would probably be far better off using 
DBI, for PgSQL is
 considered 'alpha quality' || at least that is what the README on
 CPAN says.
 
 If you have DBI/DBD::Pg installed, try this:
 
 use DBI;
 my $dbh = DBI-connect('DBI:Pg:dbname=mydb','','') || die 
$DBI::errstr;
 
 Later,
 
 Rudy


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: CachedKids Attribute need help understanding

2001-06-24 Thread Neil Lunn

-Original Message-
From: Chad [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 8:47 AM
To: [EMAIL PROTECTED]
Subject: CachedKids Attribute need help understanding


I've just started implementing prepare_cached into my scripts 
and my code is
similar to the example in the book

while ( ($field, $value) = each %search_fields ) {
push @sql,   $field = ?;
push @values, $value;
}
$qualifier = ;
$qualifier = where .join( and , @sql) if @sql;
$sth = $dbh-prepare_cached(SELECT * FROM table $qualifier);

This will keep a cached statement handle. So the next time that
prepare_cached is called all of the prepare operation is not performed if
the statement is equal to what it was before.

$sth-execute(@values);

while (@ary = $sth-fetchrow_array ())
{
print join ('\t',@ary);
}

$sth-finish();

At the end of the example in 'Programming the Perl DBI' it 
says The cache
can be accessed (and cleared) via the CachedKids attribute.

The question I have is where is it that I place CachedKids in 
order to clear
the cache.  I have no idea how to use it and the book is vague 
and doesn't
have any example on where to put it.

Searching online I've seen it used like this 
$dbh-{CachedKids};  to like
this $dbh-CachedKids(\%myHash); but I need a little more 
detail.  It may be

Thus something like this:

#!/usr/bin/perl -w
use strict;

use DBI;

my $dbh = DBI-connect(dbi:ODBC:test);
my $sth = $dbh-prepare_cached(select * from product);

my $href = $dbh-{CachedKids};

foreach my $key ( keys %{$href} ) {
print $key\n;

}

would print: select * from product.

So the statement you pass through prepare_cached is the key to CachedKids
ensuring that each statement is unique. It is not really meant as something
to recall a statement without calling prepare, but more as a speed tool
where the exact same statement has been issued before.

-Neil


that I don't need to use it at all.  If that's the case then 
please tell me.







Thanks for any help that can be provided,
Chad


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: DBI Connect Failure

2001-06-20 Thread Neil Lunn

-Original Message-
From: Christine Kluka [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 8:25 PM
To: Ronald J Kimball
Cc: [EMAIL PROTECTED]
Subject: Re: DBI Connect Failure


Ronald,

Thanks for your reply. I:  
- declared $i=0; -- it still fails to import

That means this:
  for (my $i=0; $i$nfields; $i++) {
^^

that's declaring a variable and it is a requirement of the 'use strict'
pragma.

Neil

I've tried various other things, like
- declaring $i as STDIN, then chomping it -- same result
- using code from 
http://www.perl.com/pub/1999/10/DBI.html#About_Relational_Datab
ases_Gener
for DBI-connect, but also using the code that I have -- got 
method not
supported

Ill keep trying.  In the meantime, any ideas are appreciated, thanks!

Christine

Ronald J Kimball wrote:
 
 On Tue, Jun 19, 2001 at 07:09:40PM +0200, Christine Kluka wrote:
  Now the error that I get is: xxx.cgi did not produce a 
valid header
  (name without value:got line variable $i is not imported 
at xxx.cgi
  line 65.) I need to declare the subroutine row in which 
the error is
  found to do a fetchrow later in the script, and I can't 
see an error
  in the subroutine itself.  Help!
 
 You've got use strict, but you forgot to declare the variable $i:
 
  sub row
  {
 
$r = shift(@_);
@r = @_;
$nfields = $r-nfields;
for ($i=0; $i$nfields; $i++) {
$fname = $r-fname($i);
$r{$fname} = $r[$i];
}
return %r;
  }
 
 Ronald


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Strange Warning

2001-06-13 Thread Neil Lunn


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 6:29 PM
To: [EMAIL PROTECTED]
Subject: Strange Warning


Hi,

I get a strange warning in the following part of my code:

  my @zeile;
  while (@zeile = $sth-fetchrow_array()) {
print WL @zeile\n;
  }

For every Row I get:

   Use of uninitialized value at ./wertelisten.pl line 23

How can it be undefined? On the other hand the program works find, so I

Pretty simple really. One of the fields in every row is a null value. You
probably want to replace this with a blank string for printing purposes.

another tip. Instead of:
  my @zeile;
  while (@zeile = $sth-fetchrow_array()) {

You probably want:
  while (my @zeile = $sth-fetchrow_array()) {

Nothing to do with this, but more of a good habit to get into unless you
specifically want something else.

--Neil

could just remove the -w to ignore the warnings, but I do not like this
solution very much, since -w really helps me a lot...

Peter

P.S: with print WL $zeile[0]; there are no warnings...

P.P.S: For those of you who want to see the complete code:

#!/usr/local/bin/perl -w

use DBI;
use strict;

$| = 1;
$ENV{'NLS_DATE_FORMAT'} = DD-MM-;

my @wertelisten = qw{ t_tarife t_besicherungsarten t_produktklassen };

my $dbh = 
  DBI-connect(DBI:Oracle:XXX,xxx,xyz)
  or die (Cannot connect to Oracle Database: $DBI::errstr\n);

for my $wl ( @wertelisten ) {
  open WL, out/$wl;
  my $sth = $dbh-prepare(qq{
select * from $wl
  }) or die Cannot prepare statement\n;
  $sth-execute or die Cannot execute statement;
  my @zeile;
  while (@zeile = $sth-fetchrow_array()) {
print WL @zeile\n;
  }
  $sth-finish;
  close WL
}

$dbh-disconnect() or warn Disconnection failed: $DBI::errstr\n;


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: DBI and Perl 5.6.1.62x Application Error

2001-06-13 Thread Neil Lunn

Contact ActiveState. But I would suggest ppm verify --upgrade DBI should
work.

--Neil

-Original Message-
From: John [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 8:35 PM
To: [EMAIL PROTECTED]
Subject: DBI and Perl 5.6.1.62x Application Error


Suddenly Perl doesn't work with DBI or DBD-ODBC!

It *did* work, brilliantly, until last week when I installed a 
whole load of
new modules via PPM (and upgraded from Perl 5.6.1.623 - 
5.6.1.626 ) and now
I cannot connect to any database without Perl dying.I have 
tried everything
I can think of to solve this - including removing Perl 626 
(along with all
the old modules), reinstalling version 623 (clean install) and 
re-installing
the DBI and DBD-ODBC modules - it still does not work.

Ironically I have a production machine downstairs that is 
using exactly this
setup and has no problems.

I have been through the possible scenarios of it being my 
coding, but I am
sure this is not the case (the code worked fine beforehand, 
and test scripts
fail also).

It is looking a bit like there may be a registry gremlin but I 
have no real
idea about this.

Although I have seen my error appear in the odd 
mailinglist/newsgroup to do
with Perl and DBI I have not seen any answers to this problem.

THE ERROR:

 The connection is made, the data retreived (and I can use it) 
but Perl.exe
 throws an Application Error -  The instruction at 
0x77f6754b referenced
 memory at 0x036e1e18. The memory could not be read. Click on OK to
 terminate the application.

SETUP:

 I'm using:
 - Activestate Perl build 5.6.1.626
 - $DBI::VERSION = 1.14
 - $DBD::ODBC::VERSION = '0.28'


FAILING CODE:
 Here's some code that should work fine...

   my $h = DBI-connect( DBI:ODBC:$dsn,$dbuser, $dbpass, )
 or die Can't make a connection to the Bourjois Database:
 $DBI::errstr\n;

   my $sth=$h-prepare(
SELECT page_id,title
FROM meta );

   $sth-execute();

   my $result_set = $sth-fetchall_arrayref();

   $h-disconnect();


I am running into workload problems with this now, I have been 
trying to
solve it on my own for three days. Any help would be *hugely* 
appreciated.






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.255 / Virus Database: 128 - Release Date: 5/17/01


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE:

2001-06-13 Thread Neil Lunn

Check your Informix licencing requirements and dependancies for ESQL/C for
more information on this. You are also subject to the same criteria for Perl
and other modules as stated in the Perl Artistic licence and/or other
licence statements submitted with those modules.

--Neil

-Original Message-
From: Mahdi A. Sbeih [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 9:45 PM
To: [EMAIL PROTECTED]
Subject: RE:


Any Body has unout on this ?


Hi All,

I made a Perl DBI script on Solaris 2.7, I want to send this 
script to a
customer who has also Solaris 2.7,
do the customer need to install and build DBI and DBD::Informix on that
machine? Or I can just send him the
compiled files that were built on my machine? If I can send 
him the compiled
version, what are exactly these
files and where he has to put them?

If he needs to build and install the DBI module and 
DBD::Informix himself,
can we as a company include the
DBI module and DBD::Informix tar files on our software CD, or 
there are some
regulations?


Are the DBI and DBD::Informix tar files the same for Solaris and HP-UX?


I appreciate your help.


Regards,
Mahdi.


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: DBD-Oracle 1.0.7/AIX make problem

2001-06-07 Thread Neil Lunn


Make is broken on AIX. Download gnu-make from your nearest mirror.

--Neil

 -Original Message-
 From: Tobias Hausmann [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 07, 2001 8:03 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: DBD-Oracle 1.0.7/AIX make problem
 
 
 Hi,
 
 I am working on the following environment:
 
 AIX 4.3.3, 
 Oracle 8.1.6i,
 Perl 5.00503 ,
 DBI 1.15,
 DBD-Oracle 1.0.7
 
 I am trying to install want to install DBD-Oracle 1.0.7. After perl
 Makefile.PL, make gives me the following error message:
 
 make
 Makefile:2425: *** missing separator (did you mean TAB instead of 8
 spaces?).  Stop.   
 
 I replaced the beginning spaces with a tab and became the following
 error message:
 
 make
 Makefile:2425: *** commands commence before first target.  Stop.
 
 __
 
 Makefile:
 
 # these two targets are the same as the ones above extproc_no_context
 and
 # extproc_with_context. They are preserved for backward compatibility.
  
 /bin/nm -B -h -g $$1 | grep -v ' U ' | awk 
 '{print $$3}' |
 \ - error line
  egrep -v '^\.|^TOC' | sort | uniq ; \
 }; \
 generate_export_list $(OBJS)  $(SHARED_LIBNAME).exp; \
 $(LD) -bnoentry -bM:SRE -bE:$(SHARED_LIBNAME).exp -o
 $(SHARED_LIBNAME)\
 $(OBJS) -L$(ORACLE_HOME)/lib -lc_r $(OCISHAREDLIBS) 
 $(LIBEXTP) \
 $(LIBSQL) $(TTLIBS) $(DEF_OPT) $(SSDBED) $(LIBAGENT)
 $(LIBEPCPT)   
 
 __
 
 
 Any help or advice will be most welcome.
 
 Tobias Hausmann
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





SQL Red Flags [was: Newbie looking for some Win32::ODBC Help]

2001-06-07 Thread Neil Lunn

You realise you just posted to dbi-users when your not even using DBI!
You should be though. Look for the DBI and DBD-ODBC packages. There is a
slightly different syntax to use but get used to it.

On the other hand, this is perfectly viable for discussion here. Your JOIN
syntax is wrong and pretty illegal.

What you want is:

SELECT  A1.DefaultIPGateway0, A1.IPAddress0, A1.IPSubnet0,
A1.MACAddress0, A2.Name0, A2.UserName0,
EID00, EID, FNAME, LNAME, ORG, ROOM
FROM $Table A1 INNER JOIN $Table2 A2 ON (A1.MachineID = A2.MachineID)
INNER JOIN $Table3 A3 ON (A2.MachineID = A3.MachineID) 
LEFT OUTER JOIN $Table4 A4 ON(A3.EID00 = A4.EID)

This bit is also screwy: 

AND A1.IPAddress0  ''
AND A1.IPAddress0  '0.0.0.0'
AND A1.IPAddress0  '10.10.10.10'

Try this:

WHERE A1.IPAddress0 NOT IN ('','0.0.0.0','10.10.10.10')


Pretty Clear?

--Neil

 -Original Message-
 From: Patricio M. Rueda [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 07, 2001 5:33 AM
 To: [EMAIL PROTECTED]
 Subject: Newbie looking for some Win32::ODBC Help
 
 
 Could some one help me here and tell me what's wrong with the 
 following
 code:
 
 #=
 
 
 $DSN= IPMac;
 $Table=dbo_Network_DATA;
 $Table2=dbo_Computer_System_data;
 $Table3= dbo_User_data;
 $Table4=cids;
 
 
 
 use Win32::ODBC;
 
 if (!($db = new Win32::ODBC($DSN))){
 print MACHINES Failure  no good  . 
 Win32::ODBC::Error(). \n\n;
 }else{
 print MACHINES Success (connection #, 
 $db-Connection(), )\n\n;
 $ip=;
 
 
 
 if (! $db-Sql(SELECT  A1.DefaultIPGateway0, A1.IPAddress0,
 A1.IPSubnet0,
  A1.MACAddress0, A2.Name0, 
 A2.UserName0,
 EID00, EID, FNAME, LNAME, ORG, ROOM
 
  FROM $Table A1, $Table2 A2,
 $Table3 A3 LEFT OUTER 
 JOIN $Table4 A4
 ON(A3.EID00 = A4.EID)
 
  WHERE ((A1.MachineID = A2.MachineID)  AND
 (A1.MachineID = A3.MachineID))
   AND A1.IPAddress0  ''
   AND A1.IPAddress0  '0.0.0.0'
   AND A1.IPAddress0  
 '10.10.10.10'
)){
  }
 #=
 ===
 
 
 I am trying to use (4)  MSAccess Tabels, two of which need to be join.
 
 I am getting the following error:
 
 -3530[Microsoft][ODBC Microsoft Access Driver] Join expression not
 supported.10
 
 
 
 
 
 
 
 
 
 
 
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Anyone else experiencing problems with the dbi-* mailing list s?

2001-06-07 Thread Neil Lunn


 -Original Message-
 From: Chouda, Prem [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 08, 2001 6:31 AM
 To: 'Sterin, Ilya'; 'Edward J. Sabol '; '[EMAIL PROTECTED] '
 Subject: RE: Anyone else experiencing problems with the dbi-* mailing
 list s?
 
 
 I am with Ilya.
 I am not facing any problems from last one month. :-)

Then your lucky. Not that there is a problem with this list or the
listserver, it's the mail host for perl.org. 

The hosting company valueclick.com should be looking at this but I'm only
back on being able to send mail to perl.org after two weeks. No problems
getting mail though (nothing wrong with my mail server -- he, he!)

This is not worth discussion here. Nobody can do anything about it. Take it
up with the sysadmin.

--Neil

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Only return the FIRST field from DBD/ODBC/Sql Server stored proce dure

2001-06-03 Thread Neil Lunn

 -Original Message-
 From: Guangzu Wang (Houston) [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 04, 2001 3:57 AM
 To: [EMAIL PROTECTED]
 Subject: Only return the FIRST field from DBD/ODBC/Sql Server stored
 proce dure
 
 
 I use DBD::ODBC with Easysoft ODBC bridge to connect SQL 
 server 6.5 from
 Linux. I have a stored procedure that is supposed to return 
 several fields.
 It only returns the first field of my result set. I searched 
 the archive of
 this mailing list and haven't found some encouraging news. 
  
 The book of Programming the Perl DBI (pp 296) mentioned 
 stored procedure
 can be called using {?= call procedure_name(?,?)} but then 
 said DBD::ODBC
 currently does not support output parameter. Doesn't that 
 mean I can NOT
 use that method? I tried but failed. I tried both escape 
 method like {call
 procedure_name} and direct run  as exec procedure_name, same result.

Not sure what you mean. What does the sp do? If it's just returning a rowset
as you seem to imply by the term field then it is not different from any
SELECT, PREPARE, FETCH, FETCH ... etc operation. If this isn't so you will
be better off to clarify this to the list.

  
 The same book mentioned in several places (like pp 223) that 
 fetchrow_array
 returns the value of the first field if used in a scalar 
 context. I am not
 sure about this scalar context, is this something related 

@list   = $sth-fetchrow_array;  # ie (1,2,3,4)
$scalar = $sth-fetchrow_array;  # only gets 1st element $list[0]

Which is probably what you are doing, though I am sure the book has clear
examples. I would also suggest a read of your perlvar manpage if you are not
fammiliar with the concept of scalars.


Neil

 to my problem
 about the stored procedure? 
  
 Does any one has a clue? Thanks  a lot in advance.
  
 Guangzu   
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Only return the FIRST field from DBD/ODBC/Sql Server stored proce dure

2001-06-03 Thread Neil Lunn


 -Original Message-
 From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 04, 2001 1:02 PM
 To: Neil Lunn; 'Guangzu Wang (Houston)'; [EMAIL PROTECTED]
 Subject: RE: Only return the FIRST field from DBD/ODBC/Sql 
 Server stored
 proce dure
 
  @list   = $sth-fetchrow_array;  # ie (1,2,3,4)
  $scalar = $sth-fetchrow_array;  # only gets 1st element $list[0]
 
 I believe that in a scalar contex it will return true or 
 undef, but in the
 list context
 ($scalar) = $sth-fetchrow_array it will return the first element.
 
 Ilya Sterin

You're right, that's what fetchrow_array does. I never do this though, it
was just to illustrate a point about scalar context as oposed to list
context. This may have ben misread from the docs on selectrow_array:

   the first row of data from the statement. If called in
   a scalar context, it returns the first field of the
   first row. The $statement parameter can be a
   previously prepared statement handle, in which case
   the prepare is skipped.

Neil

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Active statement error

2001-05-31 Thread Neil Lunn

Unless fetchrow_array is in a loop that would imply to me that there are
more results to fetch. If it is in a loop, is it possible there is a loop
exit before all results are fetched?

-- Neil

 -Original Message-
 From: Hèctor Alòs i Font [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 31, 2001 9:27 PM
 To: Bart Lateur
 Cc: [EMAIL PROTECTED]
 Subject: Re: Active statement error
 
 
 Simply something as simple as :
 
 $sth = $dbh-prepare (select FIELD from TABLE where
 IDENTIFIER=?);
 $sth-execute ('VALUE');
 ($field_value) = $sth-fetchrow_array;
 
 
 En/Na Bart Lateur ha escrit:
 
  On Thu, 31 May 2001 13:06:26 +0200, Hèctor Alòs i Font wrote:
 
  DBI::db=HASH(0xfa5dc)-disconnect invalidates 1 active
  statement handle (either destroy statement handles or call
  finish on them before disconnecting) at ...
  
  We are quite amazed because we can not discover which
  statement handle can be active: we just added a select
  statement in the programme.
 
  What does this particular recent addition look like?
 
  --
  Bart.
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: dbi connecting prob -

2001-05-14 Thread Neil Lunn


Well you did't say what the error was. Try this and at least you should get
an error that tells  you something about why connect is failing.

use DBI; my $dsn = 'DBI:mysql:my_database:localhost';
my $db_user_name = 'admin';
my $db_password = 'secret';
my $dbh = DBI-connect($dsn, $db_user_name, $db_password, {RaiseError =1});

Neil

 -Original Message-
 From: vortex [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 15, 2001 2:30 AM
 To: [EMAIL PROTECTED]
 Subject: dbi connecting prob -
 
 
 Why will this code not let me connect to a server
 
 use DBI; my $dsn = 'DBI:mysql:my_database:localhost'; my 
 $db_user_name = 'admin'; my $db_password = 'secret'; my ($id, 
 $password); my $dbh = DBI-connect($dsn, $db_user_name, $db_password);
 
 
 it just gives me an error, it won't let me connect
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Problems installing DBI on HP-UX 11.0 w/Perl 5.6.1

2001-05-14 Thread Neil Lunn


 -Original Message-
 From: Richard Castrios [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 15, 2001 3:14 AM
 To: '[EMAIL PROTECTED]'
 Cc: '[EMAIL PROTECTED]'
 Subject: Problems installing DBI on HP-UX 11.0 w/Perl 5.6.1
 
 
 Hello,
 
 I am getting the following error message when trying to run 
 the Makefile.PL
 when trying to install DBI 1.15 onto an HP-UX 11.0 systems.
 
 
 $opt/perl5/bin/perl Makefile.PL
 Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: lib
 /opt/perl5/lib/5.6.1/PA-RISC1.1 /opt/perl5/lib/5.6.1
 /opt/perl5/lib/site_perl/5.6.1/PA-RISC1.1 
 /opt/perl5/lib/site_perl/5.6.1
 /opt/perl5/lib/site_perl .) at Makefile.PL line 14.
 BEGIN failed--compilation aborted at Makefile.PL line 14.

Your perl installation is broken.


 
 Any suggestions would be greatly appreciated.
 
 thanks
 
 Rick Castrios
 
  ___
  
  Rick Castrios
  Sr. Systems Engineer
  
  PreVision Marketing, LLC
  55 Old Bedford Road
  Lincoln, MA 01773
  
  (781) 259-5199 Direct Dial
  (781) 259-6299 Fax
  ___
  
  
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: ODBC connects, but queries fail.

2001-05-10 Thread Neil Lunn


 -Original Message-
 From: Jack McKinney [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 12:27 AM
 To: '[EMAIL PROTECTED] '
 Subject: Re: ODBC connects, but queries fail.
 
 
 Big Brother tells me that Sterin, Ilya wrote:
  $driver = driver={Microsoft Access Driver
  (*.mdb)};DBQ=C:/databases/products.mdb;
  $dbh = DBI-connect(dbi:ODBC:$driver);
 
 I am running this script on a linux box.  This driver 
 string looks like
 what one might use on a windoze system...

Nonetheless the concept it the same, and is part of the ODBC specification.
Look at all the entries in your DSN TEST ie hostname=myhost or whatever. You
supply these as the DSN string in your connect statement.

Neil



 
 --
 [I've been] fighting with King Richard inJack McKinney
 the Crusades.  Unfortunately, _My_ father [EMAIL PROTECTED]
 couldn't get me in the National Gaurd.   http://www.lorentz.com
   -Robin Hood, Men in Tights
 1024D/D68F2C07 4096g/38AEF076
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: ODBC connects, but queries fail.

2001-05-10 Thread Neil Lunn


 -Original Message-
 From: Jack McKinney [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 1:24 PM
 To: [EMAIL PROTECTED]
 Subject: Re: ODBC connects, but queries fail.
 
 
 Big Brother tells me that Sterin, Ilya wrote:
  DBI-connect(Driver=/usr/local/lib/odbc-i02.so;Se... 
  
  You still must use DBI-connect(dbi:ODBC:dsn_string_here)
 
 I am:

Umm Jack. The main point was to see if there was a difference between isql
and DBD::ODBC.
isql should allow you to use the same connect string that you are suppling
to DBD::ODBC, so if you can supply a DSN'less connect to isql, the same
string can be used for DBD::ODBC.

Now at the end of the day, if this fails as before there is something wrong
with DBD::ODBC, but if it works then something is up with how odbc.ini is
being processed.

I get what you are trying to do which is to use TDS to remotely access MSSQL
Server. And presumably from your information you are getting this to happen
through ODBC using the isql program.

We're just trying to narrow down the differences.


Neil
 
 $driver = Driver=/usr/local/lib/odbc-i02.so;... ;
 $db = DBI-connect(DBI:ODBC:$driver) or die $DBI::errstr;
 
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: ODBC connects, but queries fail.

2001-05-10 Thread Neil Lunn

Actually just a thought. Is there a possibilty that iodbc was installed on
this machine. The driver manager found should have been reported by
Makefile.PL. I remeber Nick providing patches  explicitly so that UnixODBC
wasn't reported as something else.

Neil

 -Original Message-
 From: Neil Lunn [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 2:58 PM
 To: [EMAIL PROTECTED]
 Subject: RE: ODBC connects, but queries fail.
 
 
 
  -Original Message-
  From: Jack McKinney [mailto:[EMAIL PROTECTED]]
  Sent: Friday, May 11, 2001 1:24 PM
  To: [EMAIL PROTECTED]
  Subject: Re: ODBC connects, but queries fail.
  
  
  Big Brother tells me that Sterin, Ilya wrote:
   DBI-connect(Driver=/usr/local/lib/odbc-i02.so;Se... 
   
   You still must use DBI-connect(dbi:ODBC:dsn_string_here)
  
  I am:
 
 Umm Jack. The main point was to see if there was a difference 
 between isql
 and DBD::ODBC.
 isql should allow you to use the same connect string that you 
 are suppling
 to DBD::ODBC, so if you can supply a DSN'less connect to 
 isql, the same
 string can be used for DBD::ODBC.
 
 Now at the end of the day, if this fails as before there is 
 something wrong
 with DBD::ODBC, but if it works then something is up with how 
 odbc.ini is
 being processed.
 
 I get what you are trying to do which is to use TDS to 
 remotely access MSSQL
 Server. And presumably from your information you are getting 
 this to happen
 through ODBC using the isql program.
 
 We're just trying to narrow down the differences.
 
 
 Neil
  
  $driver = Driver=/usr/local/lib/odbc-i02.so;... ;
  $db = DBI-connect(DBI:ODBC:$driver) or die $DBI::errstr;
  
  
 
 __
 
 Please Note :
 Only  the intended recipient is authorised to access or use 
 this e-mail.  If
 you are not the intended recipient,
 please delete this e-mail and notify the sender immediately.  
  The contents
 of this e-mail are the writer's 
 opinion and are not necessarily endorsed by the Gunz Companies unless
 expressly stated.
 
 We use virus scanning software but exclude all liability for 
 viruses or
 similar in any attachment.
 
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Problem with require_version via package DBI

2001-05-09 Thread Neil Lunn

You do not actually use Apache::DBI in your script. Please Read the
documentation.

 -Original Message-
 From: Mikael Hansen [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 09, 2001 4:38 PM
 To: Perl DBI users
 Subject: Problem with require_version via package DBI 
 
 
 Hi I have a small problem
 
 I have an Apache 1.3.17, mod_perl-1.25, perl-5.6.0, ApacheDBI-0.88 and
 DBI-1.15 on a Solaris 2.8 box.
 
 I get the following error when running perl -c myStartupFile.pl:
 
 Can't locate object method require_version via package DBI at
 /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 13.
 Compilation failed in require at
 /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 8.
 BEGIN failed--compilation aborted at
 /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 8.
 Compilation failed in require at CSstartup.pl line 15.
 BEGIN failed--compilation aborted at CSstartup.pl line 15.
 
 I found one that had a similar problem;
 http://projects.is.asu.edu/pipermail/slash-help/1999-April/44.html
 
 but his suggested solution does net help. I have the package 
 name in both
 og my modules, e.g. Apache/DBI.pm and DBI.pm.
 
 Anybody know what is wrong? I have had a look at the DBI.pm. 
 Is seems to
 have a hold on the Exporter so that can not be the problem:
 
 From DBI.pm, line 148:
 use Exporter ();
 
 BEGIN {
 @ISA = qw(Exporter DynaLoader);
 
 Any help would be greatly appreciated.
 
 Best regards
   Mikael Hansen
 
 
 
 
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: executing atomic transactions in DBI

2001-05-09 Thread Neil Lunn

 -Original Message-
 From: Tim Bunce [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 7:07 AM
 To: Sterin, Ilya
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: executing atomic transactions in DBI
 
 
 but now I've changed it to say:
 
 : If you turn CRaiseError on then you'd normally turn 
 CPrintError off. 

I like that, it's an important statement to make.

 : If CPrintError is also on, then the CPrintError is done 
 first (naturally).
 
 In other words, I've removed the trying-to-be-too-clever logic.
 If you ask for both PrintError and RaiseError then that's 
 what you get.

As long and the words 'warn' and 'die' are listed in the documentation I
agree that this should be very clear.
Umm. Does that just mean in the docs or :

-if (!raise_error || (diehook  SvOK(diehook)))
+if (!raise_error)


Neil


 
 :)
 
 Tim.
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: ODBC connects, but queries fail.

2001-05-09 Thread Neil Lunn

Jack,

Just as an extra check. What do you get if you fully qualify the DSN in the
dbi connect string?
(that is, a DSN'less connection) ie dbi:ODBC:driver= 'etc'

Neil

 -Original Message-
 From: Jack McKinney [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 6:12 AM
 To: [EMAIL PROTECTED]
 Subject: DBI:ODBC connects, but queries fail.
 
 
 The end result I need is that I need to be able to 
 connect to a MSSQL
 server on a WinNT box from perl on my linux box.  If someone 
 can help me
 make this happen, I'll buy you lunch (if you aren't in 
 Austin, TX, I'll
 send you a gift certificate).  Here is what I currently have:
 
  I have installed unixodbc 2.0.6 and freetds 0.50 on my 
 linux 2.2.17
 system.  I have created the following entry in 
 /usr/local/etc/odbc.ini:
 
 [TEST]
 Driver=/usr/local/lib/odbc-i02.so
 Server=mssql.mydomain.com
 User=myuser
 Pass=mypass
 Database=testdb
 Majorver=4
 Minorver=2
 ConnectTimeout=30
 Trace=Yes
 TraceFile=/tmp/odbc-mssql
 
 
  If I run 'isql TEST' from the command line (isql is a 
 command line
 sql interpreter that comes with unixodbc), I am able to issue queries
 and get correct response from the MSSQL server at mssql.mydomain.com.
 THIS MEANS THAT MY ODBC IS INSTALLED CORRECTLY!
 
  The entry above logs to /tmp/odbc-mssql.  If I run the 
 isql command,
 issue one query, and then exit, this file contains:
 
 [Inline TDS 
 Driver][/development/src/odbc/SQLConnect.c][/development/src/o
 dbc/SQLConnect.c][89]SQL_SUCCESS
 [Inline TDS 
 Driver][/development/src/odbc/SQLGetInfo.c][/development/src/o
 dbc/SQLGetInfo.c][12]handle = $0804FA58
 [Inline TDS 
 Driver][/development/src/odbc/SQLAllocStmt.c][/development/src
 /odbc/SQLAllocStmt.c][15]handle = $0804FA58
 [Inline TDS 
 Driver][/development/src/odbc/SQLDisconnect.c][/development/sr
 c/odbc/SQLDisconnect.c][7]handle = $0804FA58
 
  So, I am ready for ODBC for perl.  I install ODBC 0.28, 
 and run the
 following script (the query is the same one I executed from isql):
 
 #!/usr/bin/perl
 
 use DBI;
 
 $query = SELECT acctid,company FROM account;
 
 #DBI-trace;
 $db = DBI-connect(DBI:ODBC:TRACK) or die $DBI::errstr;
 
 $h = $db-prepare($query);
 $h-execute;
 $save = $count = $h-rows;
 while($count  0)
  {
   @row = $h-fetchrow;
   $row = join(|,@row);
   print $row\n;
  }
 $h-finish;
 $db-disconnect;
 
  I get the following error:
 
 DBD::ODBC::st execute failed: [unixODBC][Driver Manager]Data 
 source name not found, and no default driver specified 
 (SQL-IM002)(DBD: describe/SQLColAttributes/SQL_COLUMN_LENGTH 
 err=-1) at ./test2.pl line 11.
 DBD::ODBC::db disconnect failed: (DBD: 
 db_disconnect/SQLDisconnect err=-1) at ./test2.pl line 20.
 
  
  It claims that it could not find the DSN.  Several points:
 
 1. I removed /tmp/odbc-mssql before running this script.  
 This file is back,
 which indicates to me that it _is_ finding the DSN.  How else 
 would it know
 where to write the trace?
 /tmp/odbc-mssql:
 
 
 [Inline TDS 
 Driver][/development/src/odbc/SQLConnect.c][/development/src/o
 dbc/SQLConnect.c][89]SQL_SUCCESS
 [Inline TDS 
 Driver][/development/src/odbc/SQLGetInfo.c][/development/src/o
 dbc/SQLGetInfo.c][12]handle = $08181E28
 [Inline TDS 
 Driver][/development/src/odbc/SQLSetConnectOption.c][/developm
 ent/src/odbc/SQLSetConnectOption.c][10]handle = $08181E28
 [Inline TDS 
 Driver][/development/src/odbc/SQLEndTran.c][/development/src/o
 dbc/SQLEndTran.c][43]SQL_SUCCESS
 [Inline TDS 
 Driver][/development/src/odbc/SQLSetConnectOption.c][/developm
 ent/src/odbc/SQLSetConnectOption.c][58]SQL_SUCCESS
 [Inline TDS 
 Driver][/development/src/odbc/SQLSetConnectOption.c][/developm
 ent/src/odbc/SQLSetConnectOption.c][10]handle = $08181E28
 [Inline TDS 
 Driver][/development/src/odbc/SQLSetConnectOption.c][/developm
 ent/src/odbc/SQLSetConnectOption.c][58]SQL_SUCCESS
 [Inline TDS 
 Driver][/development/src/odbc/SQLAllocStmt.c][/development/src
 /odbc/SQLAllocStmt.c][15]handle = $08181E28
 [Inline TDS 
 Driver][/development/src/odbc/SQLDisconnect.c][/development/sr
 c/odbc/SQLDisconnect.c][7]handle = $08181E28
 [Inline TDS 
 Driver][/development/src/odbc/SQLDisconnect.c][/development/sr
 c/odbc/SQLDisconnect.c][14]SQL_ERROR Active Statements exist. 
 Can not disconnect.
 
 2. If it could not find the DSN, why did the ODBC manager 
 report so many
 successful lines?
 
 3. If it could not find the DSN, then why did ODBC fail on 
 the handle-execute
 instead of the DBI-connect?  I do check the return of 
 DBI-connect, after all.
 
 I have tried many variations including setting ODBCHOME 
 and DBI_DSN in
 the environment, but always have basically the same problem.
 
 --
 There is no hook, my friend.   Jack McKinney
  There is only what we do. [EMAIL PROTECTED]
-Doc Holiday, Wyatt Earp (1994)  http://www.lorentz.com
 1024D/D68F2C07 4096g/38AEF076
 

__
Please Note :
Only  the intended 

RE: Problem with DBI and Access newbie

2001-05-09 Thread Neil Lunn

Missed this before. My eyes hurt! Answer Below.

 -Original Message-
 From: Trevor Webster [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 09, 2001 5:03 PM
 To: [EMAIL PROTECTED]
 Subject: Problem with DBI and Access newbie
 
 
 Hello
 
 I am running a Perl script that is supposed to added a record 
 to an MS Access database using the DBI module.
 
 I am testing the script using MS PWS on a Windows 2000 os 
 with Activestate Perl 626.  Input into the script comes from 
 parsed form informtion, which is working successfully.
 
 When I run the script it appears to complete successfully.  
 That is it doesn't return any script syntax or DBI error 
 messages.  But when I check the database the record has not 
 been added.
 
 The database contains a single table with 4 columns:
 Respondent
 RespIdAutonumber
 england  Text
 relativity Text
 lotr   Text
 
 Below is a copy of the script:
 
  sub UpdateDatabase(){
 
   use DBI;
 
   $DSN = Survey Results
 
   $myDb = DBI-connect('dbi:ODBC:Survey Results');
  
   #Error trapping for invalid connection
   if (! $myDb){
  print Failed to Connect $DSN\n;
  #end program as processing aborted
  die;
   }
 
   #Setup Variables for loading table data
   $england = $PostInputs{ 'england'};
   $relativity = $PostInputs{ 'relativity'};
   $lotr = $PostInputs{ 'lotr'};
 
$SQL = qq|INSERT INTO Respondent (england, relativity, 
 lotr) VALUES =
 ( '$england', '$relativity', '$lotr')|;

And theres your problem. '$england' does not interpolate. You want
$england and so forth.
Or even better:
###

$SQL = qq|INSERT INTO Respondent (england, relativity, lotr) 
VALUES = (?,?,?)|;

$sth = $dbh-prepare($SQLQ);

eval {
while (...) { # loop through each whatever
$sth-execute($PostInputs{'england'}, 
  $PostInputs('relativity'},
  $PostInPuts{'lotr'}
};
};
$dbh-commit;
};

if ($@) {
warn Transaction aborted because $@;
$dbh-rollback;
}



Not that Acess supports transactions, but it's good practice that you may as
well start learning. Besides I couldn't resist. --grin!

Neil

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Problem with DBI and Access newbie

2001-05-09 Thread Neil Lunn


 -Original Message-
 From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 2:26 PM
 To: Neil Lunn; 'Trevor Webster'; [EMAIL PROTECTED]
 Subject: RE: Problem with DBI and Access newbie
 
 
 $SQL = qq|INSERT INTO Respondent (england, relativity,
  lotr) VALUES =
  ( '$england', '$relativity', '$lotr')|;
 
 And theres your problem. '$england' does not interpolate. You want
 $england and so forth.
 
 $england would interpolate, since it's enclosed in double 
 quotes qq |  ...

Your right, my bad. Think I need glasses.

Something isn't normal here. Best to run a trace and see what is actually
happening.

 
 $england = test;
 
 print qq/this is just a '$england'/;
 
 would print
 
 this is just a 'test'
 
 
 Ilya Sterin
 
 
 
 -Original Message-
 From: Neil Lunn [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 12:11 AM
 To: 'Trevor Webster'; [EMAIL PROTECTED]
 Subject: RE: Problem with DBI and Access newbie
 
 
 Missed this before. My eyes hurt! Answer Below.
 
  -Original Message-
  From: Trevor Webster [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 09, 2001 5:03 PM
  To: [EMAIL PROTECTED]
  Subject: Problem with DBI and Access newbie
 
 
  Hello
 
  I am running a Perl script that is supposed to added a record
  to an MS Access database using the DBI module.
 
  I am testing the script using MS PWS on a Windows 2000 os
  with Activestate Perl 626.  Input into the script comes from
  parsed form informtion, which is working successfully.
 
  When I run the script it appears to complete successfully.
  That is it doesn't return any script syntax or DBI error
  messages.  But when I check the database the record has not
  been added.
 
  The database contains a single table with 4 columns:
  Respondent
  RespIdAutonumber
  england  Text
  relativity Text
  lotr   Text
 
  Below is a copy of the script:
 
   sub UpdateDatabase(){
 
use DBI;
 
$DSN = Survey Results
 
$myDb = DBI-connect('dbi:ODBC:Survey Results');
 
#Error trapping for invalid connection
if (! $myDb){
   print Failed to Connect $DSN\n;
   #end program as processing aborted
   die;
}
 
#Setup Variables for loading table data
$england = $PostInputs{ 'england'};
$relativity = $PostInputs{ 'relativity'};
$lotr = $PostInputs{ 'lotr'};
 
 $SQL = qq|INSERT INTO Respondent (england, relativity,
  lotr) VALUES =
  ( '$england', '$relativity', '$lotr')|;
 
 And theres your problem. '$england' does not interpolate. You want
 $england and so forth.
 Or even better:
 ###
 
 $SQL = qq|INSERT INTO Respondent (england, relativity, lotr)
 VALUES = (?,?,?)|;
 
 $sth = $dbh-prepare($SQLQ);
 
 eval {
 while (...) { # loop through each whatever
 $sth-execute($PostInputs{'england'},
   $PostInputs('relativity'},
   $PostInPuts{'lotr'}
 };
 };
 $dbh-commit;
 };
 
 if ($@) {
 warn Transaction aborted because $@;
 $dbh-rollback;
 }
 
 
 
 Not that Acess supports transactions, but it's good practice 
 that you may as
 well start learning. Besides I couldn't resist. --grin!
 
 Neil
 
 __
 
 Please Note :
 Only  the intended recipient is authorised to access or use 
 this e-mail.  If
 you are not the intended recipient,
 please delete this e-mail and notify the sender immediately.  
  The contents
 of this e-mail are the writer's
 opinion and are not necessarily endorsed by the Gunz Companies unless
 expressly stated.
 
 We use virus scanning software but exclude all liability for 
 viruses or
 similar in any attachment.
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Problem with DBI and Access newbie

2001-05-09 Thread Neil Lunn


 -Original Message-
 From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 2:29 PM
 To: Neil Lunn; 'Trevor Webster'; [EMAIL PROTECTED]
 Subject: RE: Problem with DBI and Access newbie
 
 
 Neil, not that I'm an Access expert, but I believe (almost 
 sure) that Access
 supports transactions with Visual Basic ODBC and as macros, 
 but are you
 saying that Access does not support transactions through DBI?

I Honestly don't know. As long as the ODBC driver supports transactions,
then Access will support transactions. I encourage anyone to try of course,
which was what I was really saying.

 
 Ilya Sterin
 
 -Original Message-
 From: Neil Lunn [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 12:11 AM
 To: 'Trevor Webster'; [EMAIL PROTECTED]
 Subject: RE: Problem with DBI and Access newbie
 
 
 Missed this before. My eyes hurt! Answer Below.
 
  -Original Message-
  From: Trevor Webster [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 09, 2001 5:03 PM
  To: [EMAIL PROTECTED]
  Subject: Problem with DBI and Access newbie
 
 
  Hello
 
  I am running a Perl script that is supposed to added a record
  to an MS Access database using the DBI module.
 
  I am testing the script using MS PWS on a Windows 2000 os
  with Activestate Perl 626.  Input into the script comes from
  parsed form informtion, which is working successfully.
 
  When I run the script it appears to complete successfully.
  That is it doesn't return any script syntax or DBI error
  messages.  But when I check the database the record has not
  been added.
 
  The database contains a single table with 4 columns:
  Respondent
  RespIdAutonumber
  england  Text
  relativity Text
  lotr   Text
 
  Below is a copy of the script:
 
   sub UpdateDatabase(){
 
use DBI;
 
$DSN = Survey Results
 
$myDb = DBI-connect('dbi:ODBC:Survey Results');
 
#Error trapping for invalid connection
if (! $myDb){
   print Failed to Connect $DSN\n;
   #end program as processing aborted
   die;
}
 
#Setup Variables for loading table data
$england = $PostInputs{ 'england'};
$relativity = $PostInputs{ 'relativity'};
$lotr = $PostInputs{ 'lotr'};
 
 $SQL = qq|INSERT INTO Respondent (england, relativity,
  lotr) VALUES =
  ( '$england', '$relativity', '$lotr')|;
 
 And theres your problem. '$england' does not interpolate. You want
 $england and so forth.
 Or even better:
 ###
 
 $SQL = qq|INSERT INTO Respondent (england, relativity, lotr)
 VALUES = (?,?,?)|;
 
 $sth = $dbh-prepare($SQLQ);
 
 eval {
 while (...) { # loop through each whatever
 $sth-execute($PostInputs{'england'},
   $PostInputs('relativity'},
   $PostInPuts{'lotr'}
 };
 };
 $dbh-commit;
 };
 
 if ($@) {
 warn Transaction aborted because $@;
 $dbh-rollback;
 }
 
 
 
 Not that Acess supports transactions, but it's good practice 
 that you may as
 well start learning. Besides I couldn't resist. --grin!
 
 Neil
 
 __
 
 Please Note :
 Only  the intended recipient is authorised to access or use 
 this e-mail.  If
 you are not the intended recipient,
 please delete this e-mail and notify the sender immediately.  
  The contents
 of this e-mail are the writer's
 opinion and are not necessarily endorsed by the Gunz Companies unless
 expressly stated.
 
 We use virus scanning software but exclude all liability for 
 viruses or
 similar in any attachment.
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





FW: database query fails when run with Perl

2001-05-07 Thread Neil Lunn



 -Original Message-
 From: Shah, Deepak K [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 08, 2001 10:32 AM
 To: '[EMAIL PROTECTED]'
 Subject: database query fails when run with Perl
 
 
 Hello,
 
 We are running a query against an Oracle database using Perl. 
 This query has
 a procedure that returns a random number which is used by the query.
 The query looks like : select a,b  from c where d=GET_RANDOM_NUMBER
 
 GET_RANDOM_NUMBER is an oracle procedure here which returns a 
 random number
 
 When we run this query directly against the database using 
 sqlplus, the
 query works fine and givs appropriate results. However, when 
 we fire the
 same query using a Perl program, it returns the following errors :
 DBD::Oracle::st execute failed: ORA-00920: invalid relational 
 operator (DBD
 ERROR: OCIStmtExecute) at orasim.pl line 741.
 DBD::Oracle::st execute failed: ORA-00936: missing expression 
 (DBD ERROR:
 OCIStmtExecute) at orasim.pl line 741.
 
 The same Perl program executes all other queries with error 
 that do not call
 the procedure as part of the sql statement.
 
 Pls help.
 
 thanx,
 deepak
 
 
 
 
 
 
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Extract data from MS Excel Spreadsheets. Can it be done?

2001-05-02 Thread Neil Lunn

 -Original Message-
 From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 02, 2001 10:56 PM
 To: 'Simon Oliver '
 Cc: '''[EMAIL PROTECTED]' ' '
 Subject: RE: Extract data from MS Excel Spreadsheets. Can it be done?
 
 
 Also I would think that this is a big enough issue to 
 address, since most of
 the servers are not NT and most of the clients are win32, therefore if
 clients are working on excel which is later uploaded to the 
 server (Unix),
 it should be processed on the server side, rather than having 
 users save as
 CSV.

I think we have side tracked here somewhat and are getting away from seeing
the problem. What needs to be addressed?

For an Excel Document to exist, there must be a Windows Machine somewhere.
Information can be extracted from this using ODBC, OLE, ADO, and all manner
of text ripping that Perl is well suited to. As a database client, this
Windows machine has all of the Native Windows ways of doing things and, of
all wonderous suprises, a Perl that runs on it too.

It seems that the focus of this thread has hitherto been about getting an MS
Excel spreadsheet onto Solaris and then processing the contents. The point
that should be open for consideration is, do you really want the whole
spreadsheet anyway, or is this just a simple tool for a user to fill in
table
information?

Unless you have some arcane layout of information in the Spreadsheet, your
probably just want to extract a table with DBD::ADO or DBD::ODBC. In fact if
the layout is anything but a table, DBI is just not your tool.

The simple thing to do is process the Excel Data on the Win32 box and send
that data to your database of choice. This can be done from either end, very
easily with just a little thought put into the process.

-- Neil

 
 Ilya Sterin
 
 -Original Message-
 From: Simon Oliver
 Cc: ''[EMAIL PROTECTED]' '
 Sent: 05/02/2001 2:27 AM
 Subject: Re: Extract data from MS Excel Spreadsheets. Can it be done?
 
 Steve Sapovits wrote:
 
   If I'm wrong about this and someone's used either DBD::ADO or
   DBD::ODBC on Sun/Solaris, I'd like to hear how you did it.
 One can't use DBD::ADO because that uses Win32::OLE which 
 needs a Win32 
 Operating System.
 
 -- 
 Simon Oliver
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: DBI buffer commit

2001-05-02 Thread Neil Lunn

Excuse me. But what exactly is your code. I hope your not looping over both
of those lines of code.

-- Neil

 -Original Message-
 From: jeff knot [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 03, 2001 8:14 AM
 To: [EMAIL PROTECTED]
 Subject: DBI buffer commit
 
 
 Hi,
 I am new to this list and I have the following question:
 
 My  database is SUN Oracle. I try to use
 perl DBI to update the record:
 $sth=$dbh-prepare(update mytable set filed=mynewrecord
where  id=?);
 $sth-execute ($i);
 After doing the above over 1000 lines, my database stucks. I 
 guess my buffer 
   overflow. Then
 I use $dbh-commit; trying to clear the buffer, but
 it is not working. I am wondering if there is a solution.
 
 Jeff
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Easiest way to tell if a table already exists?

2001-04-30 Thread Neil Lunn

 -Original Message-
 From: PD Miller [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 30, 2001 6:31 PM
 To: Sterin, Ilya; Mike Schienle; [EMAIL PROTECTED]
 Subject: RE: Easiest way to tell if a table already exists?
 
 
 At 21:56 -0400 25/4/01, Sterin, Ilya wrote:
 Why would (select * from foo) take up lost of resources?  
 Won't it just
 place the cursor at the first row and only return when rows 
 are fetched?
 
 Speaking for Oracle, as soon as the statement is executed (and before 
 any fetch) Oracle will execute the statement - and that means 
 performing the full table scan(s) or index scan(s) necessary to 
 fulfill the statement.

You missed the point. This all happens at the prepare with little cost. That
is what prepare is for.

Neil

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: I need a hand

2001-04-26 Thread Neil Lunn

Where have you set ODBCHOME to:

 -Original Message-
 From: Mike McPherson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 27, 2001 1:03 PM
 To: [EMAIL PROTECTED]
 Subject: I need a hand 
 
 
 I need a hand cause I can't seam to figure this out.
 
 As much info I can give here:
 Red Hat Linux release 6.2 (Zoot)
 Kernel 2.2.14-5.0smp on a 2-processor i686
 perl-5.6.1 from the rpm
 installed latest Bundle::DBI
 OpenLink SDK
 OpenLink Request Broker
 
 I installed the OpenLink on both my Linux and on a NT Server.
 If I configure a datasource on the NT Server and try to 
 connect to it from the linux box thru the webbased connection 
 it passes.
 I have my DBI_USER= , ODBCHOME, DBI_PASS, DBI_DSN all set in 
 the environment
 When I try to test the DBD::ODBC I get the following from a 
 verbose test
 
 
 Column count is: 4
 1: A = 5
 2: B = 12
 3: C = -1
 4: D = 11
 ok 9
  Test 10: test $DBI::err
 ok 10
  Test 11: test date values
 ok 11
  Test 12: test group by queries
 1, 1
 2, 1
 3, 1
 4, 1
 5, 1
 ok 12
 ### FAILING HERE ? ###
  Test 13: test data_sources
 dubious
 Test returned status 0 (wstat 11, 0xb)
 DIED. FAILED tests 13-14
 Failed 2/14 tests, 85.71% okay
 t/03dbatt...1..6
 ok 1
 
 Any help is greatly appriciated and if I need to provide any 
 more info please let me know.
 
 Thank You
 
 
 
 
 
 ##Þ
 print \n Welcome to NEPP;$Þ=1;while ($Þ){
 print \n$Þ;$Þ++;if ($Þ == 1000) {
 print \n$Þ.\nWell almost never ending :þ;exit;}}
 ##Þ
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: I need a hand

2001-04-26 Thread Neil Lunn

Mike, 

Could you attach the output of perl Makefile.PL and make:

perl Makefile.PL 21 | tee log-conf
make 21 | tee log-make

Neil

 -Original Message-
 From: Mike McPherson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 27, 2001 2:38 PM
 To: [EMAIL PROTECTED]
 Subject: RE: I need a hand
 
 
 Just to be certain that it wasn't a screwup in the OPenLink 
 Install I reinstalled it into my 
 
 /home/openlink
 Made the ODBCHOME=/home/openlink
 
 still get the same error
 
 
 
 
 
 ##Þ
 print \n Welcome to NEPP;$Þ=1;while ($Þ){
 print \n$Þ;$Þ++;if ($Þ == 1000) {
 print \n$Þ.\nWell almost never ending :þ;exit;}}
 ##Þ
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: I need a hand ( My ENV)

2001-04-26 Thread Neil Lunn

Hmmn. This appears to be normal. The tests are only faling on data_sources
and ping methods so
the driver should be able to be used otherwise.

Perhaps this needs someone to look at iODBC, or a different approach to the
implementation in DBD::ODBC. Not really for this discussion. Simply note
that you cannot use these methods in your code.

Neil

 -Original Message-
 From: Mike McPherson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 27, 2001 2:45 PM
 To: [EMAIL PROTECTED]
 Subject: RE: I need a hand ( My ENV)
 
 
 UDBCINI=/home/pyro/openlink/bin/udbc.ini
 DBI_PASS=
 DBI_DSN=dbi:ODBC:demo
 LD_LIBRARY_PATH=/home/pyro/openlink/lib:
 LIBPATH=/home/pyro/openlink/lib:
 DBI_USER=root
 CLASSPATH=/home/pyro/openlink/jdk1.1/opljdbc.jar:
 SHLIB_PATH=/home/pyro/openlink/lib:
 PATH=/home/pyro/openlink/bin:/home/pyro/openlink/samples/UDBC:
 /home/pyro/openlin
 k/samples/ODBC:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/ho
 me/pyro/bin
 ODBCINI=/home/pyro/openlink/bin/odbc.ini
 ODBCINSTINI=/home/pyro/openlink/bin/odbcinst.ini
 ODBCHOME=/home/pyro/openlink
 
 
 
 
 ##Þ
 print \n Welcome to NEPP;$Þ=1;while ($Þ){
 print \n$Þ;$Þ++;if ($Þ == 1000) {
 print \n$Þ.\nWell almost never ending :þ;exit;}}
 ##Þ
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Easiest way to tell if a table already exists?

2001-04-25 Thread Neil Lunn

 -Original Message-
 From: Thomas von Elling Skifter Eibner [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 25, 2001 7:27 AM
 To: Mark Riehl
  
  The New Riders MySQL book has the following statements:
  SELECT COUNT(*) FROM table_name
  SELECT * FROM table_name WHERE 1=0
  
  Each statement will succeed if the table exists.
  
  Any other way (other than calling $dbh-tables() and 
 looping through the
  results?
 
 SELECT 1 FROM table_name (just another variant of yours).
 

select * from table_name

$DBI::state will be 'S0002' if the reason for the error retuned is that the
table does not exist.

Neil

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Complex SQL statments - Do they work?

2001-04-17 Thread Neil Lunn

 -Original Message-
 From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 18, 2001 2:56 AM
 To: 'Kutler, Christopher '; ''DBI User Group' '
 Subject: RE: Complex SQL statments - Do they work?
 
 
 You sure that's an ANSI SQL statement.  Looks like a 
 procedure.  I am not

Yes it's a Transact SQL statement. Should work directly against Sybase as
well but it's not valid ANSI SQL.

Either it needs to be translated through to Perl acting on a result set
(client) or act as a stored procedure (server).

 familiar with SQL Server, but some functions here might be 
 also dependent on
 the tool used to execute this procedure.  You should run as a stored
 procedure, see docs.  Also what error message are you getting 
 and some code
 would be helpful.  Usually procedures should end with ; unlike queries
 inside the string passed to prepare().
 
 Ilya Sterin
 
 -Original Message-
 From: Kutler, Christopher
 To: 'DBI User Group'
 Sent: 04/17/2001 10:36 AM
 Subject: Complex SQL statments - Do they work?
 
 Hello All
 
 I've tried the following SQL statement which does work via SQL Server
 6.5.
 However, it does't seem to work when I run the same statment through
 DBI:
 
 select p.pieceref, d.document_id, dd.full_date,
 grant_description, heading,
 convert(varchar(255), document_type_description) as
 document_description,
 physical_format, 
 number_of_folios_etc, language = CASE 
  when english_indicator = 1 then 'English'
 when french_indicator = 1 then 'French'
 when Latin_indicator = 1 then 'Latin'
  END, convert(varchar(255), document_note) as document_note,
 names_indicator = CASE names_indicator when 1 then 'includes names of
 individuals' END, 
 goods_indicator = CASE goods_indicator when 1 then 'includes record of
 goods
 assessed' END
  from list_heading as lh 
 inner join piece_heading as ph on lh.heading_id = ph.heading_id
 inner join piece as p on ph.piece_id = p.piece_id
 left outer join document as d on p.piece_id = d.piece_id
 left outer join document_grant as dg on d.document_id = dg.document_id
 inner join grant_ as g on dg.grant_id = g.grant_id
 inner join document_date as dd on d.document_id = dd.document_id 
 order by p.pieceref
 
 Any help would be appreciated.
 
 thanks
 
 Chris
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: PROGRESS

2001-04-11 Thread Neil Lunn

Roberto,

It was my message. Like I said many hands on much work.
If you deparately need conenctivity to Progress at least for development
work you may want to look at:

http://www.openlinksw.com

There are some pretty flexible ODBC connection options for just about any
platform.


-Original Message-
From: Roberto Slepetys Ferreira [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 7:53 AM
To: [EMAIL PROTECTED]
Subject: 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

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: DBI 1.15 - regressed DBD::ADO driver?

2001-04-04 Thread Neil Lunn

 -Original Message-
 From: Tim Bunce [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 04, 2001 6:17 PM
 To: Tim Bunce; Jonathan Leffler; dbi-users
 Subject: Re: DBI 1.15 - regressed DBD::ADO driver?
 
 
 
 I'd be very happy for DBD::ADO to be released to CPAN (DBI::Shell and
 the proxy modules as well). That way development and upgrades can be
 decoupled from DBI releases.
 
 But I think I'd still like to bundle them all with the DBI. My general
 approach at this time is that all widely used pure-perl drivers (and
 DBD::ADO on Win32 counts) should be bundled with the DBI.
 
 Tim.
 

Should this be within the DBI distribtion or as Bundle::DBI? Does it really
matter?
With the recent pacthes and changes, will there be another DBI release or do
we just leave a message in the arhives to "Patch it up yourself" until
another release?

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Storing and Retrieving Arrays

2001-04-04 Thread Neil Lunn

 -Original Message-
 From: Sean Carte [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 04, 2001 7:27 PM
 To: [EMAIL PROTECTED]
 Subject: Storing and Retrieving Arrays

You're right. You have misunderstood the concept

 
 
 I've asked for help on this topic before, but received no response. 
 Is there a better way of doing this?
 
 The following is a sample script:
 
 #!/usr/bin/perl -w
 # sql_arrays.pl
 
 use strict;
 use DBI;
 use Fcntl;
 
 my $uid = 'database';
 my $db_name = 'test';
 my $table = 'array_test1';
 my $pass = '';
 my $data_source = "dbi:Pg:dbname=$db_name";
 
 my ($dbh, $rv, $str, $cursor);
 my @dwarves = qw(Happy Grumpy Dopey Doc);
 
 my $trace_level = 0;
 DBI-trace($trace_level);
 
 $dbh = DBI-connect( $data_source, $uid, $pass, {
   PrintError = 0,
   RaiseError = 0,
   AutoCommit = 0
  });
 unless ( defined($dbh) ) { warn_and_exit("DBI-connect failed: 
 $DBI::errstr\n"); }
 
 $dbh-do( "CREATE TABLE $table( dwarves TEXT[] )" ) || die 
 $dbh-errstr;
 $dbh-commit || die $dbh-errstr;
 
 $cursor = $dbh-prepare( qq{INSERT INTO $table (dwarves) VALUES (?)} )
 || die $dbh-errstr;

Maybe you want to have an array field? You would still have to insert each
element of the array, not the whole array. Below are alterations for listed
records. Otherwise -

$cursor = $dbh-prepare( qq{INSERT INTO $table (dwarves[1], dwaves[2] #etc)
  VALUES (?,?)}
   )   || die $dbh-errstr;

for (my $i=0; $i = @dwarves; $++) {
$cursor-bind_param($i, $dwarves[$i]);
}

# Or something similar.


### The listed concept
# Not this
 $cursor-execute("{@dwarves}") || die $dbh-errstr;

# But instead
foreach my $dwarf (@dwarves) {
  $cursor-execute("$dwarf") || die $dbh-errstr;
}
# Actually Tolkien says the correct plural or dwarf is dwarfs! go figure!

 $dbh-commit || die $dbh-errstr;
 $dbh-disconnect;
 
 $dbh = DBI-connect( $data_source, $uid, $pass, {
  PrintError = 0,
  AutoCommit = 0
 });
 unless ( defined($dbh) ) {
  warn_and_exit("DBI-connect failed: $DBI::errstr\n");
 }
 $cursor = $dbh-prepare( "SELECT dwarves FROM $table;" );
 $rv = $cursor-execute;
 unless ( defined($rv) ) {
  $str = $cursor-errstr;
  $dbh-disconnect;
  warn_and_exit("\$cursor-execute failed: $str\n");
 }

#Not this
 @dwarves = $cursor-fetchrow_array;

while ( my @row = $cursor-fetchrow_array ) {
push @new_dwarves, $row[0];
}
# or something like that.


 $dbh-disconnect;
 
 my $i = 0;
 foreach (@dwarves) {
  print "dwarf $i: $_\n";
  $i++;
 }
 exit 1;
 __END__
 
 What I end up with is the former @dwarves array now a scalar 
 at $dwarves[0].
 
 Have I misunderstood the purpose of the array in SQL or am I 
 just misusing it?
 -- 
 My brain hurts!
 SeanC
   Mediatek Training Institute
 26 Crart Ave., Berea, Durban, South Africa 
 -- New Address
 phone: +27 (0)31 202 1886  [EMAIL PROTECTED] -- 
 New Phone Number
fax: +27 (0)31 202 1767 
 -- New Fax Number
http://members.nbci.com/s_carte/
 

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Probably a dumb RTM question....

2001-04-02 Thread Neil Lunn

 the project fell through I never pursued it.  Anyhow I did 
 this through 
 freetds (and I remember reading a lot about sybase at the time for 
 some reason):

TDS has nothing to do with MS Access.

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Installing DBD::MySql without MySql installed

2001-03-27 Thread Neil Lunn


You should only need the client libraries for the machine you are on.

-Original Message-
From: Joe Grastara [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 9:59 AM
To: [EMAIL PROTECTED]
Subject: Installing DBD::MySql without MySql installed


Hi,

I would like to install the database driver for MySql, however I would
like to not have to install MySql on the local machine. Is there a way of
doing this?

Thanks in advance,

Joe Grastara
Project Assistant
Digital Media Center
The Skirball Institute Of Biomolecular Medicine
New York University Medical Center
540 First Ave., New York City, NY 10016 USA 
[EMAIL PROTECTED]
http://www.med.nyu.edu/graphics


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: ODBC Error - Invalid Cursor State (SQL-24000)

2001-03-26 Thread Neil Lunn

Phil,

Because I and others use DBD::ODBC with other drivers. I have no such
problem. That is why I ask the question.


-Original Message-
From: Phil R Lawrence [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 5:53 PM
To: Neil Lunn; [EMAIL PROTECTED]
Subject: Re: ODBC Error - Invalid Cursor State (SQL-24000)


"Neil Lunn" [EMAIL PROTECTED] wrote:
 As the archive suggests, this is not a Perl-DBI problem but one
with the
 Access product itself.
Is it?  I read the quoted messages a bit differently... and the
blame seemed to remain unassigned between the DBD::ODBC
implementation and MS-Access.  If it's MS-Access, fine, but then
why doesn't Jeff note this bug (inability to loop with a
pre-prepared statement handle) in the perldoc?  He is the one who
originally reported the problem and it strikes me as a biggee.

 So What version of Access are you using?
Sorry, this was buried down a few lines (MS-Access 2000).

Perhaps Neil could comment if he remembers the circumstances of
the issue from 1998.  :-)

Regards,
Phil R Lawrence


__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





Re: selectall_hashref, a future feature?

2001-03-20 Thread Neil Lunn

I already knew how to do this using fetchall_arrayref, but I don't
believe there is any documentation on how to do this one fell swoop:

 return $sth-fetchall_arrayref($slice);

Which is documented eg. fetchall_arrayref({}).

the selectall functions and the like are only utility methods to do the "one 
fell swoop" thing. Even this function uses another to recall every row in 
the table, and there is definately documentation to say that a row may be 
returned as a hashref.

So if it is possible to do it per row, it is possible to do it for the whole 
table.



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.