RE: Query output is always in UNICODE... need ANSI ... Help?

From: Huiyong Lau (HuiyongLau_at_discussions.microsoft.com)
Date: 11/26/04


Date: Thu, 25 Nov 2004 19:49:06 -0800

Yes there is, in the registry. This is a server level configuration.

default instance - HKLM\Software\Microsoft\MSSQLSERVER
named instance - HKLM\Software\Microsoft SQL Server\[instance name]

1. start regedt32.exe
2. create SQLMAPI key with blank class if it is not there already.
3. create ansi_attachment value in SQLMAPI key with REG_DWORD value type.
4. set the value to 1.

HTH,
Huiyong

"MeesterJeem" wrote:

> I'm using XP_Sendmail stored procedure to run a query and mail the
> results as an attachment in the resulting email. The process works
> fine except that the attachment (whatever.xyz) is apparently in
> UNICODE and the application that subsequently consumes the attachment
> (when double-clicked in the email)dislikes the UNICODE version of the
> attachment and rejects it. Using NOTEPAD to edit and save the
> unmodified attachment in ANSI format makes the application all happy
> and reads in the file OK.
>
> Q: Is there a way to tell SQL Server to output its results with ANSI
> coding rather than UNICODE? Perhaps there's a temporary option that
> can be set in the query?
>



Relevant Pages

  • sql browser and named instance connection issue
    ... Checking file permisisons on:\Program Files\Microsoft SQL ... Restart SQLBrowser and then your named instance. ... The suggestions in the blog post include setting the Port property in SSAS ...
    (microsoft.public.sqlserver.olap)
  • login fails when connecting to named instance from different subnet
    ... I have a default instance and a named instance of SQL ... Server 2000 on the same PC running NT server. ... the "Test Connection" button is able to connect ...
    (microsoft.public.sqlserver.security)
  • Cant connect to named instance across subnets
    ... I have a default instance and a named instance of SQL ... Server 2000 on the same PC running NT server. ... the "Test Connection" button is able to connect ...
    (microsoft.public.sqlserver.security)
  • Re: AUTHENTICATION TO APPLY SP3
    ... Did you try starting the SQL Server in single user mode? ... > cannot get past the validation portion of the SP3 ... >>> it from default to my named instance. ... >>>>If you're getting an error message about setup being ...
    (microsoft.public.sqlserver.security)