Re: how does ado.net SqlDataReader.GetString() know which encoding to read the
- From: "Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@xxxxxxxxxx>
- Date: Sat, 17 Mar 2007 18:21:05 +0100
how does ado.net SqlDataReader.GetString() know which encoding to read the
data into a string as? Does sql sever set this at the column data type
level, server wide encoding setting, os encoding?
In SQL Server, you can define collation on column level. If not, default for
all columns is database collataion; for database collation, default is
server collation. You can specify collation explicitly in the connection
string:
- in Ado.Net, use the Current Language property. If this property is not set
explicitly, SQL Server uses either its system default language or a
user-specific default language, depending on its configuration.
- in ADO, use the Language keyword in a provider string.
- in OLE DB, you can also set the provider-specific property
SSPROP_INIT_CURRENTLANGUAGE before connecting.
- For ODBC, include the LANGUAGE keyword.
- Independently of application you can use SET LANGUAGE T-SQL command to
change the language for a session.
--
Dejan Sarka
http://www.solidqualitylearning.com/blogs/
.
- Prev by Date: Re: Data mining in excel error. - cannot create model on sql AS instance.
- Next by Date: Re: Help w/pivot
- Previous by thread: Data mining in excel error. - cannot create model on sql AS instance.
- Next by thread: Re: database sharing in MS Word
- Index(es):
Relevant Pages
|
Loading