title: DBI::Sybase data-conversion resulted in overflow
body: <p>I am writing a Perl script that is using the DBI module and is connecting to a Sybase DB. I am calling a stored procedure (one that I don't have access to so I cannot post sample code) and when I get data back I get an error that reads "error_handler: Data-conversion resulted in overflow". I still get data back and after doing some intensive research it seems that some data types in the columns (such as BigInt, nvarchar, etc) are the culprits. Now the question is, how can I fix this? Can this be fixed on the client side or can it only be fixed on the server side?</p>
  
  <pre><code>my $dbh = DBI-&gt;connect("DBI:Sybase:server=$server", $username, $password, {PrintError =&gt; 0}) or die;
  $dbh-&gt;do("use $database") or die;
  my $sql = &amp;getQuery;
  my $sth = $dbh-&gt;prepare($sql) or die;
  $sth-&gt;execute() or die;
  while ($rowRef = $sth-&gt;fetchrow_arrayref) #Error seems to occur here
  {
       #Parse through each row
  }
  </code></pre>
  
  <p>Part of the FreeTDS 0.82 log that explains the problem:</p>
  
  <pre><code>_ct_bind_data(): column 7 is type 38 and has length 8
  _ct_get_server_type(0)
  _ct_get_client_type(type 38, user 0, size 8)
  cs_convert(0x18dfed40, 0x7fff73216050, 0x18e44250, 0x7fff73215fa0, 0x18e387c0, 0x18e45a64)
  _ct_get_server_type(30)
  _ct_get_server_type(0)
  converting type 127 (8 bytes) to type = 47 (9 bytes)
  cs_convert() calling tds_convert
  cs_convert() tds_convert returned 10
  cs_prretcode(0)
  cs_convert() returning  CS_FAIL
  cs_convert-result = 1
  </code></pre>