martinrybak / SQLClient

Native Microsoft SQL Server client for iOS
http://objcsharp.wordpress.com/2013/10/15/an-open-source-sql-server-library-for-ios/
MIT License
124 stars 51 forks source link

I Can't Get SYBTEXT Full Data On SQL SERVER #26

Closed PJH87 closed 7 years ago

PJH87 commented 8 years ago
if (pcol->type != SYBCHAR && pcol->type != SYBTEXT && pcol->type != SYBIMAGE)
                pcol->size = dbwillconvert(pcol->type, SYBCHAR);

            //Allocate memory in the current pcol struct for a buffer
            if ((pcol->buffer = calloc(1, pcol->size + 1)) == NULL)
                return [self executionFailure:completion];

            //Bind column name
            erc = dbbind(connection, c, NTBSTRINGBIND, pcol->size + 1, (BYTE*)pcol->buffer);
            if (erc == FAIL)
                return [self executionFailure:completion];

            //Bind column status
            erc = dbnullbind(connection, c, &pcol->status);
            if (erc == FAIL)
                return [self executionFailure:completion];

I think SYBTEXT's size convert to SYBCHAR's size...

martinrybak commented 7 years ago

Hi there, please try out the types branch. This issue should be fixed.