Interpreting COLUMN_DEF from column_info

2006-06-01 Thread Daniel Kasak
Hi all.

When I'm talking to MySQL, I can easily get the default for a column
from the COLUMN_DEF key from column_info.
However when I'm talking to SQL Server, it doesn't return an actual
value, but a 'create default' statement such as:

CREATE DEFAULT dbo.Contacts_Salutations_D AS 'Mr'

Is there anything available that will parse this for me and return the
actual value?
I realise I can just grab the stuff in quotes, but I'm just checking if
there is a better way.

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au


Re: perl- dbi

2006-06-01 Thread Jonathan Leffler

On 6/1/06, Jonathan Leffler <[EMAIL PROTECTED]> wrote:

On 6/1/06, R, Rajsekar <[EMAIL PROTECTED]> wrote:
> I  am getting this error . please let me know..  what needs to be done further
>
>   perl -MDBI -e 'print "$DBI::VERSION\n"'
> Can't locate DBI.pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris 
/usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris 
/usr/perl5/site_perl/5.005 .).
> BEGIN failed--compilation aborted.


Download, compile and install DBI.  And the driver for the DBMS you plan to use.


And, since you're using a seriously down-version of Perl, you need to
get yourself a sufficiently *old* version of DBI - one that will work
with Perl 5.5.3; the current version requires 5.6.1.

You'd be best off getting Perl 5.8.8 and redoing all the modules.
It'll be harder in the short term, but you might not need to do it
again for another 3 years.


--
Jonathan Leffler <[EMAIL PROTECTED]>  #include 
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."


Re: perl- dbi

2006-06-01 Thread Jonathan Leffler

On 6/1/06, R, Rajsekar <[EMAIL PROTECTED]> wrote:

I  am getting this error . please let me know..  what needs to be done further

  perl -MDBI -e 'print "$DBI::VERSION\n"'
Can't locate DBI.pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris 
/usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris 
/usr/perl5/site_perl/5.005 .).
BEGIN failed--compilation aborted.



Download, compile and install DBI.  And the driver for the DBMS you plan to use.


--
Jonathan Leffler <[EMAIL PROTECTED]>  #include 
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."


Re: DBD::DB2 where to get a client library

2006-06-01 Thread Dan Scott

Hi Martin:

You'll need the Application Development Client, which is a free
download from http://ibm.com/db2/udb/support/downloadv8.html.

The clients are installed as RPMs on Linux using the db2setup program
(part of the client); you might want to check out the DB2 HOWTO
(http://tldp.org/HOWTO/DB2-HOWTO/index.html) for a general
understanding of the underlying dependencies. Or post here on what
your system is and what problems you're encountering.

Dan

On 01/06/06, Martin J. Evans <[EMAIL PROTECTED]> wrote:

I'm posting this on behalf of a colleague who is struggling to
get DBD::DB2 working on a machine remote to the DB2 database.
We have DB2 installed and DBD::DB2 working on that machine
but where can we download only the DB2 client (or whatever
DBD::DB2 needs) to use DBD::DB2 to connect to a remote DB2
database on Linux? So far all we've found is an RPM with
some dependency-hell and this is not a redhat system.

Thanks.

Martin



RE: perl- dbi

2006-06-01 Thread R, Rajsekar
Hi,
 
I  am getting this error . please let me know..  what needs to be done further
 
  perl -MDBI -e 'print "$DBI::VERSION\n"'
Can't locate DBI.pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris 
/usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris 
/usr/perl5/site_perl/5.005 .).
BEGIN failed--compilation aborted.
 
 
 
Regds,
R.Rajasekar



From: Jonathan Leffler [mailto:[EMAIL PROTECTED]
Sent: Wed 31/05/2006 21:31
To: R, Rajsekar
Cc: dbi-users@perl.org
Subject: Re: perl- dbi



On 5/31/06, R, Rajsekar <[EMAIL PROTECTED]> wrote:
>how do i ensure that DBI is installed in my machine..
> will it be automatically installed when perl is installed...
>
> i am getiing error when i start using  use DBI;
> and i need to connet to ORACLE DATABASE.

You've received a few workable answers - but there's a better one.

perl -MDBI -e 'print "$DBI::VERSION\n"'

This tells you which version of DBI you have installed - which can be
even more valuable than simply knowing that DBI is installed.

Similarly:

perl -MDBD::Oracle -e 'print "$DBD::Oracle::VERSION\n"'

Similarly for any other (civilized) module - whether in the DBI/DBD
collection or not.

--
Jonathan Leffler <[EMAIL PROTECTED]>  #include 
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."





Re: DBD::DB2 where to get a client library

2006-06-01 Thread Shlomi Fish
On Thursday 01 June 2006 12:08, Martin J. Evans wrote:
> I'm posting this on behalf of a colleague who is struggling to
> get DBD::DB2 working on a machine remote to the DB2 database.
> We have DB2 installed and DBD::DB2 working on that machine
> but where can we download only the DB2 client (or whatever
> DBD::DB2 needs) to use DBD::DB2 to connect to a remote DB2
> database on Linux? So far all we've found is an RPM with
> some dependency-hell and this is not a redhat system.
>

I'd guess that you need to buy a licence for the client from IBM, and download 
the client library/executable. See:

http://www-306.ibm.com/software/data/db2/

Regards,

Shlomi Fish

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.


Re: Problems with Error Handling

2006-06-01 Thread Tim Bunce
On Wed, May 31, 2006 at 08:57:23PM -0700, Don Mies wrote:
> Tim, et. al.  Following is a small sample program that demonstrates my 
> problem:
> 
>my $stmtHandle = $dbHandle->prepare ( $insert );
> 
>$dbHandle->{AutoCommit} = 0;
>$dbHandle->{PrintError} = 0;
>$dbHandle->{RaiseError} = 1;

You're altering the parent handle attributes after you've created a
child handle. The changes won't affect the child. See the DBI docs.

Tim.


DBD::DB2 where to get a client library

2006-06-01 Thread Martin J. Evans

I'm posting this on behalf of a colleague who is struggling to
get DBD::DB2 working on a machine remote to the DB2 database.
We have DB2 installed and DBD::DB2 working on that machine
but where can we download only the DB2 client (or whatever
DBD::DB2 needs) to use DBD::DB2 to connect to a remote DB2
database on Linux? So far all we've found is an RPM with
some dependency-hell and this is not a redhat system.

Thanks.

Martin