Страница: 1 |
Вопрос: У Вас ошибочка! ВОт что сервер выдает! | Добавлено: 13.11.04 14:23 |
Автор вопроса: ![]() |
Server Error in '/' Application. -------------------------------------------------------------------------------- Cast from type 'DBNull' to type 'Date' is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Cast from type 'DBNull' to type 'Date' is not valid. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidCastException: Cast from type 'DBNull' to type 'Date' is not valid.] Microsoft.VisualBasic.CompilerServices.DateType.FromObject(Object Value) +230 BusinessModel.Users.TryLogIn(String Login, String Password) in D:\Documents and Settings\Павел\Мои документы\Visual Studio Projects\NewVBNet\BuisnessModel\Users.vb:25 NewVBNet.Enter.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\NewVBNet\Online\Enter.aspx.vb:39 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 |
Ответы | Всего ответов: 7 |
Номер ответа: 1 Автор ответа: ![]() ![]() ![]() ![]() ![]() ICQ: 348453688 Вопросов: 88 Ответов: 356 |
Web-сайт: Профиль | Цитата | #1 | Добавлено: 13.11.04 18:24 |
это у них бывает время от времени... |
Номер ответа: 2 Автор ответа: ![]() ![]() ![]() Вопросов: 215 Ответов: 1596 |
Web-сайт: Профиль | Цитата | #2 | Добавлено: 13.11.04 20:40 |
особенно в поиске |
Номер ответа: 3 Автор ответа: ![]() ![]() ![]() ![]() Вопросов: 36 Ответов: 326 |
Профиль | Цитата | #3 | Добавлено: 15.11.04 01:15 |
особенно в поиске по тексту... ![]() Server Error in '/' Application.
-------------------------------------------------------------------------------- Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.] System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45 System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior) +28 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +88 BusinessModel.Forum.GetSearchResults(String criteria, String forumcriteria) in D:\Documents and Settings\Павел\Мои документы\Visual Studio Projects\NewVBNet\BuisnessModel\Forum.vb:472 BusinessModel.Forum.Search(String Text, SearchWhere Where, Int32 Forum, Boolean WholeWord) in D:\Documents and Settings\Павел\Мои документы\Visual Studio Projects\NewVBNet\BuisnessModel\Forum.vb:534 NewVBNet.search.btnSearch_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\NewVBNet\Forum\search.aspx.vb:63 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +58 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1315 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 |
Номер ответа: 4 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() Администратор ICQ: 326066673 Вопросов: 368 Ответов: 5968 |
Web-сайт: Профиль | Цитата | #4 | Добавлено: 15.11.04 11:05 |
Ммм... Видимо SQL-запрос тяжелый ![]() Попробую увеличить таймаут, может поможет... |
Номер ответа: 5 Автор ответа: ![]() ![]() ![]() Вопросов: 1 Ответов: 2 |
Web-сайт: Профиль | Цитата | #5 | Добавлено: 21.02.05 21:03 |
Ох, люди я с этой же проблемой промучился с полдня! В итоге было найдено её решение:
' функция, написанная кровью и потом для того чтобы не вылазила ошибка при обращении к пустым ячейкам в БД Public Function GetStringValue(ByVal dbValue As Object) As String ![]() If Not dbValue Is System.DBNull.Value Then result = Convert.ToString(dbValue) Else result = "" End If Return result End Function |
Номер ответа: 6 Автор ответа: ![]() ![]() ![]() Вопросов: 1 Ответов: 2 |
Web-сайт: Профиль | Цитата | #6 | Добавлено: 21.02.05 21:04 |
Правда тут надо было строку получить, но в Вашем случае - это будет что-то типа: Convert.ToDate |
Номер ответа: 7 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() Администратор ICQ: 326066673 Вопросов: 368 Ответов: 5968 |
Web-сайт: Профиль | Цитата | #7 | Добавлено: 22.02.05 09:06 |
Решение проще: выставить в БД в нужных полях значение по умолчанию ![]() |
Страница: 1 |
|