Hi
I am getting [OleDbException (0x80004005): Operation must use an updateable
query.] error on ExecuteNonQuery() . Full code is given below. The values I
have given are; ('trtrt', 'retret', '1/1/2', '333'). Any idea what is the
problem?
Thanks
Regards
Dim sSQL As String = "INSERT into Applications (forenames, surname, dob,
[number]) " & _
"VALUES ('" & txtForenames.Text & "', '" & txtSurname.Text & "', '" &
txtDOB.Text & "', '" & txtNumber.Text & "')"
' Response.Write(sSQL)
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("/") + "Staff_Application/Staff_Application.mdb" & ";"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(sSQL, MyConn)
MyConn.Open()
cmd.ExecuteNonQuery() '<=== This line gives the error.
MyConn.Close() 4 5601
It could be a permission problem!
Make sure u have full right to the MDB file or the Directory!
GDLUCK
"John" wrote: Hi
I am getting [OleDbException (0x80004005): Operation must use an updateable query.] error on ExecuteNonQuery() . Full code is given below. The values I have given are; ('trtrt', 'retret', '1/1/2', '333'). Any idea what is the problem?
Thanks
Regards
Dim sSQL As String = "INSERT into Applications (forenames, surname, dob, [number]) " & _ "VALUES ('" & txtForenames.Text & "', '" & txtSurname.Text & "', '" & txtDOB.Text & "', '" & txtNumber.Text & "')" ' Response.Write(sSQL) Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ Server.MapPath("/") + "Staff_Application/Staff_Application.mdb" & ";" Dim MyConn As New OleDbConnection(strConn) Dim cmd As New OleDbCommand(sSQL, MyConn) MyConn.Open() cmd.ExecuteNonQuery() '<=== This line gives the error. MyConn.Close()
HI John,
It could be a permission problem.
Make sure u have FULL right on the MDB file or the Directory!
Or u could close ur Access before running the page:)
GDLUCK
"John" wrote: Hi
I am getting [OleDbException (0x80004005): Operation must use an updateable query.] error on ExecuteNonQuery() . Full code is given below. The values I have given are; ('trtrt', 'retret', '1/1/2', '333'). Any idea what is the problem?
Thanks
Regards
Dim sSQL As String = "INSERT into Applications (forenames, surname, dob, [number]) " & _ "VALUES ('" & txtForenames.Text & "', '" & txtSurname.Text & "', '" & txtDOB.Text & "', '" & txtNumber.Text & "')" ' Response.Write(sSQL) Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ Server.MapPath("/") + "Staff_Application/Staff_Application.mdb" & ";" Dim MyConn As New OleDbConnection(strConn) Dim cmd As New OleDbCommand(sSQL, MyConn) MyConn.Open() cmd.ExecuteNonQuery() '<=== This line gives the error. MyConn.Close()
John wrote: I have right clicked on app folder under 'my default web' under 'Internet Information Services', selected 'Permissions Wizard' and given the default permissions. Still no luck. What else can I try? The machine is win xp pro.
Thanks
Regards
You have to set permissions on the file system, not (just) IIS.
At least the mdb file must be writable for the aspnet-user,
(the account the aspnet process runs under)
maybe the directory also.
Hans Kesting
I have right clicked on app folder under 'my default web' under 'Internet
Information Services', selected 'Permissions Wizard' and given the default
permissions. Still no luck. What else can I try? The machine is win xp pro.
Thanks
Regards
"Patrick.O.Ige" <Pa*********@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com... It could be a permission problem! Make sure u have full right to the MDB file or the Directory! GDLUCK
"John" wrote:
Hi
I am getting [OleDbException (0x80004005): Operation must use an
updateable query.] error on ExecuteNonQuery() . Full code is given below. The
values I have given are; ('trtrt', 'retret', '1/1/2', '333'). Any idea what is
the problem?
Thanks
Regards
Dim sSQL As String = "INSERT into Applications (forenames, surname, dob, [number]) " & _ "VALUES ('" & txtForenames.Text & "', '" & txtSurname.Text & "', '" & txtDOB.Text & "', '" & txtNumber.Text & "')" ' Response.Write(sSQL) Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& _ Server.MapPath("/") + "Staff_Application/Staff_Application.mdb" & ";" Dim MyConn As New OleDbConnection(strConn) Dim cmd As New OleDbCommand(sSQL, MyConn) MyConn.Open() cmd.ExecuteNonQuery() '<=== This line gives the error. MyConn.Close() This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom wilson |
last post by:
This is driving me nuts. I'm trying to update an Excel spreadsheet
using ADO.Net and Oledb in VB.Net. The connection is open, the
adapter is connected and the dataset is loaded. Here's the code...
|
by: ano1optimist |
last post by:
I have been running these queries in Access 2000 with no problems.
This week, I had to install Access 2003 to create some runtime
versions for another application, and now I keep getting "operation...
|
by: MDW |
last post by:
Hey all.
I'm confused. I'm trying to add a single record into an Access 2000 database
using ASP.Net. Here is the code:
objConn = New OleDbConnection(strConnect)
objConn.Open
objCommand =...
|
by: Neil Zanella |
last post by:
Hello,
I am trying to update an MS access database from ASP.NET. I am using IIS on
Windows XP Pro. I can issue SELECT statements from ASP.NET using ADO.NET but
I cannot seem to be able to carry...
|
by: SheryMich |
last post by:
Hi -
I am having a bit of a problem with the insert into a database. When I go
to insert a record into an un-keyed, single table Access database, I get the
aforementioned ''Operation Must Use an...
|
by: Jim in Arizona |
last post by:
I've been using an example out of a book to be able to edit the rows in a
database. I am getting the following error:
========================================================...
|
by: Muskito |
last post by:
HELP!!!
Hello All,
I'm using VB.net 2003 and trying to update data in Excel worksheet.
The program selects data from the excel, updates something in the MSSQL
DB and then tries to update...
|
by: Arpan |
last post by:
I have always been working with SQL Server 2005 for ASP.NET apps but
due to some reasons, had to revert back to MS-Access 2000.
When I try to insert/update a MS-Access DB table (MDB), ASP.NET...
|
by: pavya |
last post by:
Hi,
I have developed one Web application. At that time my system had a FAT file system on it and this application worked properly. But now i have converted FAT file system to NTFS file system and...
|
by: rickmedlin |
last post by:
I know this has been posted on elsewhere but I'm stuck. I'm using the following append query to copy an Access query to Excel:
INSERT INTO .
SELECT *
FROM Test;
This isn't the real table...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |