Long Varchar data type in SQL Anywhere

Posts   
 
    
fripco
User
Posts: 4
Joined: 20-Aug-2010
# Posted on: 21-Feb-2012 16:44:34   

We're using LLBLGEN v.2.6 Final and cataloging Sybase SQL Anywhere v.10.01.3750. We noticed that a database column defined as Long Varchar is assigned a length of 32767. One of our programs threw an overflow error when the entity column was assigned a string value that was longer. Sybase says a Long Varchar has a max length of 2GB. Is there a way to override the 32767? Thanks much!

Alan.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 21-Feb-2012 21:01:08   

Hi Alan,

Just to be sure and identify where the problem is, please post this:

  • LLBLGen Runtime library version (http://llblgen.com/tinyforum/Messages.aspx?ThreadID=7718)
  • The DDL definition of the involved column. (how it's defined exactly in your db)
  • The Full exception message and stacktrace (that one you receive when you try to insert more than 32767 chars).
David Elizondo | LLBLGen Support Team
fripco
User
Posts: 4
Joined: 20-Aug-2010
# Posted on: 21-Feb-2012 21:56:09   

daelmo wrote:

Hi Alan,

Just to be sure and identify where the problem is, please post this:

  • LLBLGen Runtime library version (http://llblgen.com/tinyforum/Messages.aspx?ThreadID=7718) 2.6 Final - Released on October 9th, 2009
  • The DDL definition of the involved column. (how it's defined exactly in your db)Long Varchar
  • The Full exception message and stacktrace (that one you receive when you try to insert more than 32767 chars).The value specified will cause an overflow error in the database. Value length: 36970. Column max length: 32767
Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 22-Feb-2012 09:51:52   

This seems related to the following thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=17688

Would you please try the latest release of v.2.6, and see if it solves the problem.

fripco
User
Posts: 4
Joined: 20-Aug-2010
# Posted on: 23-Feb-2012 17:40:03   

I downloaded the latest release of v2.6 and cataloged. The column defined as 'long varchar' stayed at 32767. The link in your previous message referred to a column defined as 'image'. I added an 'image' column to the end of my table and it cataloged correctly as 2GB. Is there any solution for the 'long varchar'? Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 24-Feb-2012 10:20:53   

We use the 'width' field in the meta data of the table, which is unreliable for some types (it returns 32KB while it can be 2GB).

We've updated the driver to handle long* columns as 2GB, similar to image. It's attached (release build)

Attachments
Filename File size Added on Approval
SD.LLBLGen.Pro.DBDrivers.SybaseAsaDBDriver.dll 57,344 24-Feb-2012 10:21.00 Approved
Frans Bouma | Lead developer LLBLGen Pro
fripco
User
Posts: 4
Joined: 20-Aug-2010
# Posted on: 24-Feb-2012 21:26:40   

Beautiful!! Thank you both for your help!

Alan.