Skip to Content.
Sympa Menu

freetds - Re: [freetds] Cannot send UTF-8 chars to MSSQL 2008

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Daniel Fazekas <fdsubs AT t-online.hu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Cannot send UTF-8 chars to MSSQL 2008
  • Date: Fri, 4 Jun 2010 13:46:45 +0200

On Jun 4, 2010, at 13:26, Niklas Lampén wrote:

> Calling stored procedure with tsql
> 1> EXECUTE Mod_Text_Put_Content @ContentId=6824, @Content=N'Найти',
> @SiteId='niklas'
> 2> go
> is a success, too. Now I just have to figure out how to submit that data
> from PHP with this Unicode marking N. I can choose field types for
> mssql_bind()

I can only suggest that you don't really need mssql_bind/mssql_execute if you
are only using input parameters.

You could simply use mssql_query("EXECUTE Mod_Text_Put_Content
@ContentId=6824, @Content=N'Найти', @SiteId='niklas'");

Just make sure to properly escape ' characters.

7 years ago when I last had access to a copy of MS SQL Server and last used
FreeTDS, _bind/_execute were so unreliable we just converted all stored
procedures to use input parameters only.





Archive powered by MHonArc 2.6.24.

Top of Page