This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.
When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:
Hi, joe
when <add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="true"/> error occurs with sqlce db.
error in below code
mojoPortal.Data.SqlCe\DBSiteSettings.cs
/////////////////////////////////////////////////////////////////////////////////////////////
public static int GetSiteIdByFolder(string folderName){int siteId = -1;
StringBuilder sqlCommand = new StringBuilder();
SqlCeParameter[] arParams = new SqlCeParameter[1];
arParams[0] = new SqlCeParameter("@FolderName", SqlDbType.NVarChar, 255);arParams[0].Direction = ParameterDirection.Input;arParams[0].Value = folderName;
sqlCommand.Append("SELECT COALESCE(s.SiteID, -1) ");sqlCommand.Append("FROM mp_SiteFolders sf ");sqlCommand.Append("JOIN mp_Sites s ");sqlCommand.Append("ON ");sqlCommand.Append("sf.SiteGuid = s.SiteGuid ");sqlCommand.Append("WHERE sf.FolderName = @FolderName ");sqlCommand.Append("ORDER BY s.SiteID ");sqlCommand.Append(";");
using (IDataReader reader = SqlHelper.ExecuteReader(GetConnectionString(),CommandType.Text,sqlCommand.ToString(),arParams)){if (reader.Read()){siteId = Convert.ToInt32(reader["SiteID"]);}}
......
////////////////////////////////////////////////////////////////////////////
above bold code error.
if change to
siteId = Convert.ToInt32(reader[0]);
then will ok!
thanks!
version: 2.3.7.5
db: sqlce
os: windows 7
Hi,
Thanks for the bug report.
This fix is now in the source code repository so it will be fixed in the next release.
Best,
Joe