Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Do you have an explanation for this?

Reply
Thread Tools

Do you have an explanation for this?

 
 
George Ter-Saakov
Guest
Posts: n/a
 
      04-29-2004
I guess an ADO update had to be done.
Installation of MS SQL just did it

George.


"Pravin A. Sable" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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()
>



 
Reply With Quote
 
 
 
 
Pravin A. Sable
Guest
Posts: n/a
 
      04-30-2004
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()

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE;Kontki if you delete kontiki any program you loaded with it in it 'will not work I have tried it with three programs and none work anymore (if you se it just stop download) 1-Twitch Computer Support 5 04-23-2009 02:45 PM
Adprep /domainprep: If you have multiple domains, you have to run oneach? pez MCSE 1 03-15-2008 11:21 PM
You have come? Definitely you have not gone shoplifes Python 0 11-25-2007 03:09 PM
You have come? Definitely you have not gone shoplifes Computer Support 0 11-25-2007 03:08 PM
If you have a Nvidia 6800 you have been conned. Geronimo NZ Computing 5 10-28-2004 08:00 PM



Advertisments