CodeIgniter Forums
mssql string lengths - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: mssql string lengths (/showthread.php?tid=9484)



mssql string lengths - El Forum - 06-26-2008

[eluser]edhrx[/eluser]
I am porting over a mysql / web app to mssql as the back end. I use the database to handle cacheing of fragments / pages <select>'s etc.

The problem I have is whilst I can input and update the cache field ( this is a mssql text field) with any size of data when I select from it it always truncates it. I have tried using the odbc drivers and that has the same problem.


Ed..


mssql string lengths - El Forum - 07-02-2008

[eluser]Randy Casburn[/eluser]
Hi Ed,

I need the exact version of MySQL you are running. I need to know if you are running in "Strict Mode". I also need to know the setting my my.ini for the max_allowed_packet setting.

Randy


mssql string lengths - El Forum - 07-02-2008

[eluser]edhrx[/eluser]
Randy
dont know if you are posting on the right topic but my problem is with mssql not mysql Smile

Ed..


mssql string lengths - El Forum - 07-03-2008

[eluser]Randy Casburn[/eluser]
Sorry ED...Same kinda issue really. These are common problems. What are Textsize and Textlimit set to your php.ini file. This is likely the culprit.

Randy


mssql string lengths - El Forum - 07-03-2008

[eluser]Randy Casburn[/eluser]
those are mssql.textsize and mssqltextlimit

Off the top of my head....


mssql string lengths - El Forum - 07-03-2008

[eluser]edhrx[/eluser]
@randy

phpinfo dos'nt show it as being set, and with my hosting I could'nt edit php.ini if I wanted to. Do you think ini_set() is an option

Ed.


mssql string lengths - El Forum - 07-03-2008

[eluser]Randy Casburn[/eluser]
Right then. ini_set() and/or you'll need to do is issue an SQL query to set this. That should solve your problem. You'll likely need to do both . The query should be:

Code:
mssql_query("SET TEXTSIZE 2147483647");

This has mixed results. You may have to get with your hosting company if this does not work and plead with them to set the configuration for you.


mssql string lengths - El Forum - 07-03-2008

[eluser]edhrx[/eluser]
resolved...
I was able to crank up the values for mssql.textlimit and mssql.textsize using ini_set.


mssql string lengths - El Forum - 07-03-2008

[eluser]Randy Casburn[/eluser]
Great! Glad you got it sorted out.