RE: switching to a different database from a DSN

2001-07-11 Thread Gregory_Griffiths

Some databases allow you to share tables form others, so you could try 
that, I think that it is called a Database Link.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 11 July 2001 14:18
 To: [EMAIL PROTECTED]
 Subject: switching to a different database from a DSN
 
 
 Hi all,
 
 I am using DBI::ODBC on windows platform to
 access Informix database.
 I defend database x when I created the DSN.
 Is there a way to switch to a database different
 from the one defined when creating the DSN.
 
 In other words use the same DSN to access all the 
 database on the same database server.
 $dbh = DBI-connect(dbi:ODBC:myDSN,,,\%attr);
 




RE: Array problem

2001-07-06 Thread Gregory_Griffiths

If this is going to be included in a Dropdown then you'll need to do 
something like :

print option$cc[2]/option

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 06 July 2001 16:15
 To: Griffiths, Gregory D. /here
 Subject: RE: Array problem
 
 
 
 At the moment I'm just using print as in
 
 print $cc[2]br;
 
 while I try and work out what is wrong.
 
   Chris
 
 
  Message History 
 
 
 
 From: [EMAIL PROTECTED] on 06/07/2001 15:10 CET
 
 To:   Chris Saunders/DMGIT/DMG UK/DeuBa@DMG UK
 cc:
 Subject:  RE: Array problem
 
 
 how are you sending it back to the client ? NN can be funny about
 certain things that IE just lets pass.
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 06 July 2001 16:09
  To: [EMAIL PROTECTED]
  Subject: Array problem
 
 
  This might not strictly be a DBI problem so I apologise in advance.
 
  I'm writing an enquiry form and want to have some dropdown
  lists built from the DB so I'm doing a select and then
  assigning it to an array
  using push - sample code below...
 
  while (@data = $sth-fetchrow_array())
   {
 push (@cc,@data);
   }
 
  The problem I've got is I can print the values of the new
  array in IE but not Netscape and I can't see why. Does
  Netscape have some
  sort of limit coz one of the selects is getting aound 6500 elements.
 
  I'd appreciate any help you can give me coz I've been stuck
  on this for about 2 days.
 
  Chris
 
 
  --
 
  This e-mail may contain confidential and/or privileged
  information. If you are not the intended recipient (or have
  received this e-mail in error) please notify the sender
  immediately and destroy this e-mail. Any unauthorised
  copying, disclosure or distribution of the material in this
  e-mail is strictly forbidden.
 
 
 
 
 
 
 
 
 
 --
 
 This e-mail may contain confidential and/or privileged 
 information. If you are not the intended recipient (or have 
 received this e-mail in error) please notify the sender 
 immediately and destroy this e-mail. Any unauthorised 
 copying, disclosure or distribution of the material in this 
 e-mail is strictly forbidden.
 
 
 




RE: Slow execution

2001-06-12 Thread Gregory_Griffiths

How often is the data changed ? Is it required to be 'real time' ? If 
not, then perhaps you could use a snapshot rather than a big query ? 
have you tried using indexes as well ?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 12 June 2001 14:29
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: Slow execution
 
 
 
 I am also facing this kind of stuff.  But I see the problem 
 in SELECT only.
 I am joining 6 tables some of them from other databases.  and 
 when I run the
 query on SQL client it takes time but not that much the perl 
 DBI is taking.
 ofcourse my oracle database contains millions of records. Is that the
 problem?
 
 Regards,
 Prem
 
 
 
 
 -Original Message-
 From: Michelle Gerfort [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 12, 2001 9:29 AM
 To: Michael Nhan; [EMAIL PROTECTED]
 Subject: Re: Slow execution
 
 20
 Actually the sqlstatement takes a while with the sqlplus as 
 well, so I guess
 it might be a tuning issue.
 Anyway, Here is a snip of my code, with a lot of time checks:
 
 ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
 localtime(time);
 print Time before preparing sqlstatement: $hour $min $sec br;
 
  my $sth = $dbh-prepare( $sql );
 print $sql br;
 
  ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
 localtime(time);
 print Time before executing the sqlstatement: $hour $min 
 $sec br;
 
  $sth-execute();
 
 ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
 localtime(time);
 print Time after executing the sqlstatement, before 
 binding to columns:
 $hour $min $sec br;
 
 $sth-bind_columns( @AllBcol );
 
 ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
 localtime(time);
 print Time after binding to columns: $hour $min $sec br;
 
 I can se in the time-outputs, that it takes a very long time doing the
 execution
 
 /Michelle
 
 Michael Nhan wrote:
 
  Hi,
 
  Can you post snipet of code so we can assist you?  Include the sql
  statement if possible?  Does the same statement work 
 quickly on sqlplus?
  If not then its probably a sql statement/database tuning issue.
 
  Michael
 
  On Tue, 12 Jun 2001, Michelle Gerfort wrote:
 
   Date: Tue, 12 Jun 2001 15:17:28 +0200
   From: Michelle Gerfort [EMAIL PROTECTED]
   To: [EMAIL PROTECTED] [EMAIL PROTECTED]
   Subject: Slow execution
  
   Hi there
  
   I use an ordinary
   $sth-execute();
   but it seems to take ages to search, creating or updating a post.
   Is this problem due to the sqlstatement or is it a known 
 problem with a
   perl DBI interface?
  
   I run Oracle 7.3.3 on an AIX 4.2 with roxen as webserver.
  
   --
   MVH
   Michelle
  
   ---
   Michelle Gerfort
   Software Engineer
  
   Teligent AB
   P.O. Box 1191
   SE-581 11 Linköping, Sweden
  
   www.teligent.se
  
  
  
 
 --
 MVH
 Michelle
 
 ---
 Michelle Gerfort
 Software Engineer
 
 Teligent AB
 P.O. Box 1191
 SE-581 11 Linköping, Sweden
 
 www.teligent.se
 
 




RE: MS Access

2001-06-01 Thread Gregory_Griffiths

Try using DBI::Proxy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 01 June 2001 11:20
 To: [EMAIL PROTECTED]
 Subject: MS Access
 
 
 Dear Friends,
 
 I would like to access Microsoft Access database file ie 
 .mdb, through
 perl under Unix/ Linux platform. Please guide me whether this 
 is possible
 or not with some resources.
 
 Regards
 Suresh Kannan
 
 




RE: Quick Question

2001-05-29 Thread Gregory_Griffiths

Just try the DBD::ODBC drivers or the Win32::ODBC drivers (the latter 
are part of the current ActiveState distribution I think).

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 29 May 2001 13:17
 To: [EMAIL PROTECTED]
 Subject: Quick Question
 
 
 I have installed the DB2 ODBC (DBD::DB2) drivers in my 
 Windows NT4.0 work
 station and it works ver well.  However, I also need to connect to
 an ACCESS database, what drivers do I need to install and will this
 create a conflict with the DB2 drivers?
 
 
 
 Thanks in advance.
 
 Pat
 
 




RE: Fetching Column Names

2001-05-08 Thread Gregory_Griffiths

You can do a DESC command in SQL, although most interfaces also provide 
a specific way of doing this.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 08 May 2001 10:45
 To: [EMAIL PROTECTED]
 Subject: Fetching Column Names
 
 
 Is it possible to fetch the names of all columns in a table? How 
 about all tables in a database?
 -- 
 My brain hurts!
 SeanC
   Mediatek Training Institute
 26 Crart Ave., Berea, Durban, South Africa
 phone: +27 (0)31 202 1886  [EMAIL PROTECTED]
fax: +27 (0)31 202 1767
http://members.nbci.com/s_carte/
 




RE: unable to find cl.exe

2001-04-26 Thread Gregory_Griffiths

with the ActiveState bundle is a tool called PPM - Perl Package Manager 
- I suggest that you use that to get and install the DBI, it worked for 
me.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 26 April 2001 15:08
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: unable to find cl.exe
 
 
 I'm having a problem building DBI - I am getting the error 
 stating it is
 unable to find cl.exe
 I am using Windows NT - ActiveState (version 5.00502) Any help is
 appreciated.
 
 Carl Abel
 
 The following is the output requested in the Readme file for 
 the DBI bundle.
 I performed a realclean prior to doing all of these
 
 1.
 perl MakeFile.pl
   *** The optional PIRPC-modules are not loaded
   Warning - Changes are missing from my kit
   Writing Makefile for DBI
 
 nmake (where I first experience the error)
   It went through the mkdir, cp, and Skip commands
   perl -... Perl.xsi  (ok)
   perl -... Perl.c (ok)
   cl.exe -c -... Perl.c
   The name specified is not recognized as an internal or
 external command, operable program or batch file.
   NMAKE: fatal error U1077: 'C:\WINNT\system32\cmd.exe' :
 return code '0x1'
   Stop.
 
 nmake test
   cl.exe -c -... Perl.c (Same error as above)
 
 nmake test TEST_VERBOSE=1
   cl.exe -c -... Perl.c (Same error as above)
 
 2.
 This is perl, version 5.005_02 built for MSWin32-x86-object
 
 Copyright 1987-1998, Larry Wall
 
 Binary build 502 provided by ActiveState Tool Corp.
 http://www.ActiveState.com
 Built 10:59:41 Aug 11 1998
 
 Perl may be copied only under the terms of either the 
 Artistic License or
 the
 GNU General Public License, which may be found in the Perl 
 5.0 source kit.
 
 Complete documentation for Perl, including FAQ lists, should 
 be found on 
 this system using 'man perl' or 'perldoc perl'. If you have 
 access to the 
 Internet, point your browser at http://www.perl.com/, the 
 Perl Home Page.
 
 3. No core dump
 
 4. Installation does not succeed.
 




FW: How to add records to Access

2001-04-23 Thread Gregory_Griffiths

 just do a DO command with an INSERT query.

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 23 April 2001 13:58
  To: [EMAIL PROTECTED]
  Subject: How to add records to Access
  
  
  Can anyone tell me how  to add records to an MS ACCESS database?
  I  am using Perl/DBI/CGI to access the db.
  Any ideas, thanks
  
  Miguel
  
  
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com