누구든지 사용자 등록을 시도 할 때 오류가 발생하여 모든 것이 로컬에서 제대로 작동하지만 원격으로 파일을 업로드 할 때 오류가 발생합니다. 내 코드 Heres는파일을 인터넷에 업로드 할 때 오류가 발생합니까?
Dim conn As OleDbConnection
Dim strinsert As String
Dim cmdinsert As OleDbCommand
conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|sabersolutions.mdb")
strinsert = "INSERT INTO register(Name,Email,Passwords,Newsletter,ReportTemplates,ReturningMember,Sponsor)SELECT TOP 1 @Name,@Email,@Passwords,@Newsletter,@ReportTemplates,@ReturningMember,@Sponsor FROM register WHERE NOT EXISTS(SELECT 1 FROM register WHERE [email protected] AND [email protected] AND [email protected] AND [email protected] AND [email protected] AND [email protected] AND [email protected])"
cmdinsert = New OleDbCommand(strinsert, conn)
cmdinsert.Parameters.Add("@Name", OleDbType.VarWChar, 255).Value = txtName.Text
cmdinsert.Parameters.Add("@Email", OleDbType.VarWChar, 255).Value = txtEmail.Text
cmdinsert.Parameters.Add("@Passwords", OleDbType.VarWChar, 255).Value = txtPass.Text
cmdinsert.Parameters.Add("@Sponsor", OleDbType.Boolean, 1).Value = ckSponsor.Checked
cmdinsert.Parameters.Add("@Newsletter", OleDbType.Boolean, 1).Value = ckNews.Checked
cmdinsert.Parameters.Add("@ReportTemplates", OleDbType.Boolean, 1).Value = ckReportTemp.Checked
cmdinsert.Parameters.Add("@ReturningMember", OleDbType.Boolean, 1).Value = ckRSponsor.Checked
cmdinsert.Parameters.Add("@Sponsor", OleDbType.Boolean, 1).Value = ckSponsor.Checked
cmdinsert.Connection.Open()
cmdinsert.ExecuteNonQuery()
cmdinsert.Connection.Close()
LblSuccess.Text = "You have successfully Register, Please Login to view our Online Booking Sytem."
오류 나는
Server Error in '/' Application.
Operation must use an updateable query.
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: Operation must use an updateable query.
Source Error:
Line 27: cmdinsert.Connection.Open()
Line 28:
Line 29: cmdinsert.ExecuteNonQuery()
Line 30:
Line 31: cmdinsert.Connection.Close()
Source File: C:\inetpub\vhosts\sabersolutions.co.za\httpdocs\RegisterandLoginForm.aspx.vb Line: 29
스택 추적 점점 오전 :
[OleDbException (0x80004005): Operation must use an updateable query.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1081356
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +247
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +194
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +167
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
RegisterandLoginForm.Button2_Click(Object sender, EventArgs e) in C:\inetpub\vhosts\sabersolutions.co.za\httpdocs\RegisterandLoginForm.aspx.vb:29
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
버전 정보 : 마이크로 소프트 .NET 프레임 워크 버전 : 4.0.30319을; ASP.NET 버전 : 4.0.30319.272
가능한 복제본 [작업은 업데이트 가능한 쿼리를 사용해야합니다. (오류 3073) Microsoft Access] (http://stackoverflow.com/questions/170578/operation-must-use-an-updatable-query-error-3073-microsoft-access) –
안녕하세요 누구든지 내게 뭐가 잘못 말해 줄 수 있습니까? 코드가 어떻게 작동하는지는 모르겠지만 원격으로는 안됩니다. 업데이트 된 쿼리에 대한 대답을 이해할 수 없습니다. 예를 들어 어떤 코드를 사용해야하는지 알려주십시오. 사전에이 프로젝트를 완료하는 데 어려움을 겪고 있습니다. – user1983152