Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Помогите с обновлением данных... / 1 сообщений из 1, страница 1 из 1
17.03.2006, 00:45
    #33606838
Viktor Bartel
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Помогите с обновлением данных...
Добрый день,

У меня возникла следующая проблема, я пытаюсь занести данные в таблицу в аксесе, следующим образом:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
			DateTime datNow = DateTime.Now;
			string strNow = datNow.ToString("dd-M-yy \a\t hh:mm:ss");
			string filePath = this.Page.Request.PhysicalApplicationPath+@"\database\"; //get phisical file path
			//DB_Agnet acc_agent = new DB_Agnet("provider=Microsoft.JET.OLEDB.4.0; data source = "+filePath+"users.mdb");//create new db agent
			string strConnect = "provider=Microsoft.JET.OLEDB.4.0; data source = "+filePath+"users.mdb"; 
			string strSQL = @"INSERT INTO users(user_fname, user_lname, user_company, user_town, user_mail, user_tel, user_fax, user_info, user_date, user_zip, user_address)
												VALUES('"+box_fname.Text+"', '"+box_lname.Text+"', '"+box_comp.Text+"', '"+box_town.Text+"', '"+box_mail.Text+"', '"+box_tel.Text+"', '"+box_fax.Text+"', '"+box_comt.Text+"', '"+DateTime.Now.ToString()+"', '"+box_zip.Text+"', '"+box_addr.Text+"')";
			OleDbConnection  objConnect = new OleDbConnection(strConnect);
			OleDbCommand objCommand = new OleDbCommand(strSQL, objConnect);
			int intRowsAffected;
			objConnect.Open();

			// execute the SQL statement against the command
			// the ExecuteNonQuery method returns the number of records affected
			intRowsAffected = objCommand.ExecuteNonQuery();
И в результате я получаю следующую ошибку:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
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.OleDb.OleDbException: Переполнение

Source Error: 


Line  95 : 			// execute the SQL statement against the command
Line  96 : 			// the ExecuteNonQuery method returns the number of records affected
Line  97 : 			intRowsAffected = objCommand.ExecuteNonQuery();
Line  98 : 		}
Line  99 : 	}
 

Source File: c:\inetpub\wwwroot\little_project\index.aspx.cs    Line:  97  

[OleDbException (0x80040e57): Переполнение]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
   little_project.UserWebForm.SubButton_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\little_project\index.aspx.cs: 97 
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()

Кто знает в чем дело и как решить эту проблему, помогите....

Сапсибо
--
Cordialement
Victor Bartel
...
Рейтинг: 0 / 0
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Помогите с обновлением данных... / 1 сообщений из 1, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]