|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Sybase text columns with DBD/DBI?
Date: Jan 26 2000 5:44PM
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;
#DBI->trace(3);
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...')
});
$sth->execute;
Are you doing something different?
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|