0

I've got a PHP form that stores information in a SQL Server database, using SQLTEXT to bind. The content is correctly stored in the database, but when I try to retrieve the information to display a printable copy of the submitted information back to the user I get an error using SQLTEXT. Instead of using that data type I've used SQLVARCHAR, but I'm only getting a 241 characters back.

To retrieve the content I'm binding using: mssql_bind($statement, "@SPVaraible", $exportvariable, SQLVARCHAR, TRUE);

Is there something I'm missing?

Karen Dixon
  • 43
  • 1
  • 4
  • Have you tried using the final `$maxlen` argument to [`mssql_bind()`](http://php.net/manual/en/function.mssql-bind.php)? – DaveRandom Jan 02 '13 at 13:08
  • I've tried this, but no joy so far. I presume this has to match the length of the database field? I'm waiting for the database developer to get back to me with that info. – Karen Dixon Jan 05 '13 at 10:43
  • You should be able to retrieve this information from the database yourself, take a look at http://stackoverflow.com/questions/319354/what-is-the-equivalent-of-describe-table-in-mssql – DaveRandom Jan 05 '13 at 16:31

1 Answers1

0

Please read PHP Manual for mssql_bind, you can define maxlen for SQLVARCHAR.

Reinstar
  • 146
  • 1
  • 1
  • 21