Welcome Guest, Not a member yet? Register   Sign In
mssql string lengths
#1

[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..
#2

[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
#3

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

Ed..
#4

[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
#5

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

Off the top of my head....
#6

[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.
#7

[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.
#8

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

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




Theme © iAndrew 2016 - Forum software by © MyBB