473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Do you have an explanation for this?

Dear All

Error mentioned below this e-mail was NOT fixed.
1) After user ASP.net was given write privileges.
2) After giving write permission in IIS and Windows Explorer.

It was fixed,
After installing SQL Server 2000 Developer edition on my machine.

Can anybody tell, what is that SQL Server 2000 does which makes
connectivity to Access 2000 database possible for insert/update
operation possible in ASP.net code which wasn't possible earlier?

I think it is something to do with the way data is access. Please help.
Does this mean that if we want to connect to Access 2000 database,in
ASP.net we need to Install SQL Server :-) If that's the case then it's
big move by Microsoft to sell SQL Server.

Those were nice days in VB6 when when we used to connect to access and
open as many connections as we want and it never used to complaint.

-Pravin


I am trying to execute following code

Sub SubmitBtn_Click(ByVal Sender As Object, ByVal E As EventArgs)
Dim DBConn As OleDbConnection
Dim DBInsert As New OleDbCommand
DBConn = New OleDbConnection("PROVIDER=" _
& "Microsoft.Jet.OLEDB.4.0;" _
& "DATA SOURCE=" _
& Server.MapPath("Emps.mdb;"))
DBInsert.CommandText = "Insert Into Employees " _
& "(LastName, FirstName, PhoneNumber, EmailAddress, " _
& "Notes, DepartmentID) values (" _
& "'" & Replace(txtLastName.Text, "'", "''") & "', " _
& "'" & Replace(txtFirstName.Text, "'", "''") & "', " _
& "'" & Replace(txtPhoneNumber.Text, "'", "''") & "', " _
& "'" & Replace(txtEmailAddress.Text, "'", "''") _
& "', " _
& "'" & Replace(txtNotes.Text, "'", "''") & "', " _
& ddlDepartments.SelectedItem.Value & ")"
DBInsert.Connection = DBConn
DBInsert.Connection.Open()
DBInsert.ExecuteNonQuery()
Response.Redirect("./index.aspx")
End Sub

while executing following
DBInsert.ExecuteNonQuery()

query is
Insert Into Employees (LastName, FirstName, PhoneNumber, EmailAddress,
Notes, DepartmentID) values ('asdfas', 'asdf', 'asdfasfdasdf', 'asf',
'asdfasdf', 3)
I get an error saying as follows, Whats happening... it's new to me..
more to that its an example striaght copy paste from one book.

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 58: DBInsert.Connection = DBConn
Line 59: DBInsert.Connection.Open()
Line 60: DBInsert.ExecuteNonQuery()
Line 61: Response.Redirect("./index.aspx")
Line 62: End Sub
Source File: c:\inetpub\wwwroot\WebApplication1\add1.aspx.vb Line: 60

Stack Trace:
[OleDbException (0x80004005): Operation must use an updateable query.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior
behavior, Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method)
System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
WebApplication1.add1.SubmitBtn_Click(Object Sender, EventArgs E) in
c:\inetpub\wwwroot\WebApplication1\add1.aspx.vb:60
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()

Nov 18 '05 #1
1 1122
I guess an ADO update had to be done.
Installation of MS SQL just did it

George.
"Pravin A. Sable" <pr****@ccs.neu.edu> wrote in message
news:OA*************@TK2MSFTNGP10.phx.gbl...
Dear All

Error mentioned below this e-mail was NOT fixed.
1) After user ASP.net was given write privileges.
2) After giving write permission in IIS and Windows Explorer.

It was fixed,
After installing SQL Server 2000 Developer edition on my machine.

Can anybody tell, what is that SQL Server 2000 does which makes
connectivity to Access 2000 database possible for insert/update
operation possible in ASP.net code which wasn't possible earlier?

I think it is something to do with the way data is access. Please help.
Does this mean that if we want to connect to Access 2000 database,in
ASP.net we need to Install SQL Server :-) If that's the case then it's
big move by Microsoft to sell SQL Server.

Those were nice days in VB6 when when we used to connect to access and
open as many connections as we want and it never used to complaint.

-Pravin


I am trying to execute following code

Sub SubmitBtn_Click(ByVal Sender As Object, ByVal E As EventArgs)
Dim DBConn As OleDbConnection
Dim DBInsert As New OleDbCommand
DBConn = New OleDbConnection("PROVIDER=" _
& "Microsoft.Jet.OLEDB.4.0;" _
& "DATA SOURCE=" _
& Server.MapPath("Emps.mdb;"))
DBInsert.CommandText = "Insert Into Employees " _
& "(LastName, FirstName, PhoneNumber, EmailAddress, " _
& "Notes, DepartmentID) values (" _
& "'" & Replace(txtLastName.Text, "'", "''") & "', " _
& "'" & Replace(txtFirstName.Text, "'", "''") & "', " _
& "'" & Replace(txtPhoneNumber.Text, "'", "''") & "', " _
& "'" & Replace(txtEmailAddress.Text, "'", "''") _
& "', " _
& "'" & Replace(txtNotes.Text, "'", "''") & "', " _
& ddlDepartments.SelectedItem.Value & ")"
DBInsert.Connection = DBConn
DBInsert.Connection.Open()
DBInsert.ExecuteNonQuery()
Response.Redirect("./index.aspx")
End Sub

while executing following
DBInsert.ExecuteNonQuery()

query is
Insert Into Employees (LastName, FirstName, PhoneNumber, EmailAddress,
Notes, DepartmentID) values ('asdfas', 'asdf', 'asdfasfdasdf', 'asf',
'asdfasdf', 3)
I get an error saying as follows, Whats happening... it's new to me..
more to that its an example striaght copy paste from one book.

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 58: DBInsert.Connection = DBConn
Line 59: DBInsert.Connection.Open()
Line 60: DBInsert.ExecuteNonQuery()
Line 61: Response.Redirect("./index.aspx")
Line 62: End Sub
Source File: c:\inetpub\wwwroot\WebApplication1\add1.aspx.vb Line: 60

Stack Trace:
[OleDbException (0x80004005): Operation must use an updateable query.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)
System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult) System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior
behavior, Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method)
System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
WebApplication1.add1.SubmitBtn_Click(Object Sender, EventArgs E) in
c:\inetpub\wwwroot\WebApplication1\add1.aspx.vb:60
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
0
by: Premshree Pillai | last post by:
Hey, For the uninitiated: an explanation of makeExe.py (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/266471), in the form of an article, “Create Python Executables Automatically”, is...
0
by: Premshree Pillai | last post by:
Hello, An explanation of makeExe.bat (http://premshree.resource-locator.com/j/post.php?id=152) has been appended to (http://www.devx.com/opensource/Article/20247/0/page/3) "Create Python...
5
by: Jay | last post by:
PREDICATES Used as a clause. A. What does PREDICATES mean? B. What does it mean when used in a where clause? I checked BOL (Glossary) but get no explanation there. Thanks Jay
4
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all...
2
by: Dave Taylor | last post by:
Is there a decent explanation of how menu merging with MDI forms work in VB.NET? I've read through the online help and it still seems that whenever I change menus around or whatever, it breaks...
14
by: Akhil | last post by:
plz c d following code #include<stdio.h> void main() { int x=4,y=1; y=x++++; //gives error message lvalue required y=x++ + ++y;//no errors
12
by: jacob navia | last post by:
Hi I am writing this tutorial stuff again in the holidays and I came across this problem: The "width" field in printf is a minimum width. Printf will not truncate a field. for instance:...
4
by: dismantle | last post by:
Hi all, this is my 3rd week in studying VB codes and i came across with this codes from a online tutorial about classes. Public Function MiddleInitial() As String MiddleInitial =...
16
by: DamienS | last post by:
In the interests of me saving hair, can someone please explain to me what's going on below? Why doesn't == work in comparing two int's when cast as objects? They're the same type. Note that it...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.