Skip to Content.
Sympa Menu

freetds - TDS/Perl/DBD:Sybase question...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: mjn <mjn AT umn.edu>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: TDS/Perl/DBD:Sybase question...
  • Date: Tue, 21 May 2002 14:30:38 -0500 (CDT)


We just moved to a new SQL 2000 server and I am having problems with some
cell values. Mainly, that I am querying with this statement:

# Prepare a query for the database
my $sth = $dbh->prepare("SELECT last_name, first_name, x500_id
FROM $_[1] WHERE ($_[2] LIKE '$_[3]%' OR $_[2] LIKE '$_[4]%' OR $_[2] LIKE
'$_[5]%' OR $_[2] = $_[6]) AND x500_id IS NOT NULL")
|| die "Couldn't prepare statement: " . $dbh->errstr;
# Execute the prepared query

Where the array i am passing to the sub routine looks like this:

@profacad = qw (profacad email_main jobcode 93 96 97 9546);

But I get this error:

DBD::Sybase::st fetch failed: Server message number=245 severity=16
state=1 line=1 server=ISSQL text=Syntax error converting the varchar value
'9402A' to a column of data type int. at /profacad_gen.pl line 59.

I have checked the table design and the data type for that column
(jobcode) is varchar and this exact query worked with SQL 7.0.

Anyone seen anything like this or know what the problem might be or have
suggestions for fixing it?

RedHat 7.2, Perl 5.6.0, DBD-Sybase 0.94, FreeTDS 0.53

Thanks...

--
____________________________
Mike Neuharth
ADCS Technology Specialist
http://www.umn.edu/adcs

E-Mail : mjn AT umn.edu
Page Mail : 6126486512 AT page.metrocall.com
____________________________
Recursive: Adj. See Recursive.




  • TDS/Perl/DBD:Sybase question..., mjn, 05/21/2002

Archive powered by MHonArc 2.6.24.

Top of Page