Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "sue corwin" <scorwin at mediaone dot net>
Subject: RE: Sybase text columns with DBD/DBI?
Date: Jan 26 2000 6:30PM

Sorry everyone...  I was logged in as a different user which did not have
this database as default database -- hence the reason for why I could do it
in ISQL, and not in my Perl script...

I'm learning...

Thanks for the replies.


-----Original Message-----
[]On Behalf Of Michael Peppler
Sent: Wednesday, January 26, 2000 12:45 PM
To: SybPerl Discussion List
Subject: Re: Sybase text columns with DBD/DBI?

sue corwin writes:
 > I've got the following simple INSERT STATEMENT that I pass to a prepare
 > and then execute statement...
 > INSERT INTO table1 ( col1, col2, col3,
 > col4, col5 ) VALUES ( 836 ,2 ,'TEST of TEXT FIELD' ,1 ,'just a test...'
 > )
 > where col3 is declared as TEXT field on the table, table1.
 > It works if I run it in ISQL, but not in the Perl script using DBI and
 > Sybase DBD.  I'm using DBI version 1.13 and Sybase DBD 0.19.  Any ideas?

Hmmm... I just tried this with my copy, and it seems to work fine:

#!/usr/bin/perl -w

use DBI;

my $dbh = DBI->connect('dbi:Sybase:server=troll;database=testdb', 'sa', '');

my $sth = $dbh->prepare(qq{
INSERT INTO table1 ( col1, col2, col3,
col4, col5 ) VALUES ( 836 ,2 ,'TEST of TEXT FIELD' ,1 ,'just a test...')


Are you doing something different?

Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: