Last post May 10, 2012 09:35 PM by Decker Dong - MSFT
May 09, 2012 05:53 AM|dragon_ballz96|LINK
I am using VS 2010 dataset to call SQL server 2005 stored procedures (SP) in my ASP .Net application. I realized that all the fields which were defined as nvarchar in the SPs have been considered as WChar (StringFixedLength) in the XSD. This has caused unwanted
whitespaces in the data.
I don't have such issue when I am using VS2008 dataset. Any advise? Let me know. Thks.
May 10, 2012 09:35 PM|Decker Dong - MSFT|LINK
As far as I see，I think any field type related with char，nchar，varchar，……will be converted to string in the DataSet。So your problem is really very strange……
And if possible，please do this to see what's happening：
using(SqlDataAdapter adapter = new SqlDataAdapter("Your StoredProcdure Name","Your connection String……"))
DataTable dt = new DataTable();
adapter.SelectCommand.CommandType = CommandType.StoredProcdure;