![](/img/trans.png)
[英]Integer is being returned as 0 when it shouldn't be. Retrieved from database
[英]dot (.) is being retrieved as © from MySQL database
我已经将Image的路径存储在MYSQL表中,现在当我尝试检索路径时,所有路径都可以正确检索,除了.jpg的dot(。)被检索为©jpg之外,因此出现了一个例外,即没有这样的文件存在。
string fileName =Convert.ToString(dt.Rows[rowIndex]["photo"]); //File name with Exstension and Path
FileInfo fi = new FileInfo(fileName);
BitmapImage img = new BitmapImage(); //BitmapImage for showing in the image control
img.BeginInit();
img.UriSource = new Uri(fileName);
img.EndInit();
imgPic.Source = img;
我发现了问题。 我实际上已将该特定列的排序规则从ascii_general_ci更改为armcii8_general_ci
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.