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

pulling text from varchar(MAX) column is truncated to 4096 characters #33

Closed indieshack closed 7 years ago

indieshack commented 7 years ago

I'm attempting to pull data from a varchar(MAX) column, but it truncates to 4096 characters - any idea what's happening? thanks

martinrybak commented 7 years ago

Please use the types branch, it is a pre-1.0.0 release. The maximum length of a string in a query is configured on the server via the SET TEXTSIZE command. To find out your current setting, execute SELECT @@TEXTSIZE. SQLClient uses 4096 by default. To override this, update its maxTextSize property.

indieshack commented 7 years ago

Thanks for the fast reply. I changed out the SQLClient code in my project for the "types" branch but now get the following linking on compile for testing on a sim:

Undefined symbols for architecture x86_64: "_dbanydatecrack", referenced from: ___32-[SQLClient execute:completion:]_block_invoke in SQLClient.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

martinrybak commented 7 years ago

You need to update to update the libsybdb.a file as well.

indieshack commented 7 years ago

Thanks - looks like this branch can't make simultaneous connections?

martinrybak commented 7 years ago

Simultaneous connections were never supported.

indieshack commented 7 years ago

Thanks Martin, then I'm looking at some other change in behavior from an earlier version. Appreciate your fast response.

martinrybak commented 7 years ago

Yes, the API is a little different and I fixed a lot of bugs and added proper type handling. Please run the integration test suite against your SQL Server to make sure everything works. Instructions are in the readme.

indieshack commented 7 years ago

Appreciate your work on this - it's been a lifesaver :)

martinrybak commented 7 years ago

Thanks! Glad you found it useful.