473,387 Members | 2,436 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,387 software developers and data experts.

Must Use Updateable Query

Question - I keep getting the above error when I try to run an INSERT query
against an Access database. I'm running XP Professional and VS.NET 2003. I
run SELECT queries from ASP.NET against it all day long, and when I run the
INSERT query inside Access itself, it works fine. But for some reason when
I run it from within ASP.NET, I get the "Must Use Updateable Query" error.
I've tried searching and have also tried setting the permissions on the
directory to be as liberal as possible. Is there another security setting
I'm missing? Or is there an incompatibility with my query? Or some other
problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder] ([CustomerID],
[Subtotal], [Tax], [Discount], [ShippingMethod], [ShippingCost], [Total],
[OrderDate], [ShipName], [ShipAddress], [ShipCity], [ShipState], [ShipZIP],
[CCNum], [CCExp]) VALUES (6, 190, 10.2885, 9.5, ""Express"", 10, 200.7885,
""1/15/2005 9:53:29 PM"", ""Joe Mocling"", """", ""Atlanta"", ""GA"", """",
"""", ""1/1/2005 12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()
Nov 19 '05 #1
17 1523
Hi Michael,

This is usually caused by the current user - ASP.NET not having sufficient
privileges in the directory where the .mdb file is located. Access needs to
create a locking file when it is run... that requires change permissions on
the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and VS.NET
2003. I run SELECT queries from ASP.NET against it all day long, and when
I run the INSERT query inside Access itself, it works fine. But for some
reason when I run it from within ASP.NET, I get the "Must Use Updateable
Query" error. I've tried searching and have also tried setting the
permissions on the directory to be as liberal as possible. Is there
another security setting I'm missing? Or is there an incompatibility with
my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder] ([CustomerID],
[Subtotal], [Tax], [Discount], [ShippingMethod], [ShippingCost], [Total],
[OrderDate], [ShipName], [ShipAddress], [ShipCity], [ShipState],
[ShipZIP], [CCNum], [CCExp]) VALUES (6, 190, 10.2885, 9.5, ""Express"",
10, 200.7885, ""1/15/2005 9:53:29 PM"", ""Joe Mocling"", """",
""Atlanta"", ""GA"", """", """", ""1/1/2005 12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()


Nov 19 '05 #2
Thanks Ken, I found that link on a previous search. I've configured the
settings on this box and the web directory to be as liberal as possible, but
nothing seems to be working. I've changed the security settings in IIS to
allow everything and even gave the IUSR_ Administrator rights to see if that
was an issue. On the properties box in Windows Explorer for the folder,
I've allowed everything!

What security settings am I missing and how in the world can I set them in
XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ue****************@TK2MSFTNGP12.phx.gbl...
Hi Michael,

This is usually caused by the current user - ASP.NET not having sufficient
privileges in the directory where the .mdb file is located. Access needs
to create a locking file when it is run... that requires change
permissions on the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and VS.NET
2003. I run SELECT queries from ASP.NET against it all day long, and
when I run the INSERT query inside Access itself, it works fine. But for
some reason when I run it from within ASP.NET, I get the "Must Use
Updateable Query" error. I've tried searching and have also tried setting
the permissions on the directory to be as liberal as possible. Is there
another security setting I'm missing? Or is there an incompatibility
with my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder] ([CustomerID],
[Subtotal], [Tax], [Discount], [ShippingMethod], [ShippingCost], [Total],
[OrderDate], [ShipName], [ShipAddress], [ShipCity], [ShipState],
[ShipZIP], [CCNum], [CCExp]) VALUES (6, 190, 10.2885, 9.5, ""Express"",
10, 200.7885, ""1/15/2005 9:53:29 PM"", ""Joe Mocling"", """",
""Atlanta"", ""GA"", """", """", ""1/1/2005 12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()

Nov 19 '05 #3
Michael,

The account that you must give read/change/write
permissions to is the ASPNET account, not the
IUSR_ Administrator nor the IUSR_ MachineName account.

Make sure you don't only give those rights over the .mdb file.

You need to give those rights to the ASPNET account
over the *directory* where the Access .mdb file is located.


Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
Thanks Ken, I found that link on a previous search. I've configured the
settings on this box and the web directory to be as liberal as possible,
but nothing seems to be working. I've changed the security settings in
IIS to allow everything and even gave the IUSR_ Administrator rights to
see if that was an issue. On the properties box in Windows Explorer for
the folder, I've allowed everything!

What security settings am I missing and how in the world can I set them in
XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ue****************@TK2MSFTNGP12.phx.gbl...
Hi Michael,

This is usually caused by the current user - ASP.NET not having
sufficient privileges in the directory where the .mdb file is located.
Access needs to create a locking file when it is run... that requires
change permissions on the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and
VS.NET 2003. I run SELECT queries from ASP.NET against it all day long,
and when I run the INSERT query inside Access itself, it works fine.
But for some reason when I run it from within ASP.NET, I get the "Must
Use Updateable Query" error. I've tried searching and have also tried
setting the permissions on the directory to be as liberal as possible.
Is there another security setting I'm missing? Or is there an
incompatibility with my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder] ([CustomerID],
[Subtotal], [Tax], [Discount], [ShippingMethod], [ShippingCost],
[Total], [OrderDate], [ShipName], [ShipAddress], [ShipCity],
[ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6, 190, 10.2885, 9.5,
""Express"", 10, 200.7885, ""1/15/2005 9:53:29 PM"", ""Joe Mocling"",
"""", ""Atlanta"", ""GA"", """", """", ""1/1/2005 12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()


Nov 19 '05 #4
This is also a common message generated when the table does not have a
primary key.

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #5
Are you giving those rights to the correct user? If Anonymous isn't allowed,
this should tell you who you are dealing with:

Response.Write(Web.HttpContext.Current.User.Identi ty.Name)

Ken

"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
Thanks Ken, I found that link on a previous search. I've configured the
settings on this box and the web directory to be as liberal as possible,
but nothing seems to be working. I've changed the security settings in
IIS to allow everything and even gave the IUSR_ Administrator rights to
see if that was an issue. On the properties box in Windows Explorer for
the folder, I've allowed everything!

What security settings am I missing and how in the world can I set them in
XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ue****************@TK2MSFTNGP12.phx.gbl...
Hi Michael,

This is usually caused by the current user - ASP.NET not having
sufficient privileges in the directory where the .mdb file is located.
Access needs to create a locking file when it is run... that requires
change permissions on the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and
VS.NET 2003. I run SELECT queries from ASP.NET against it all day long,
and when I run the INSERT query inside Access itself, it works fine.
But for some reason when I run it from within ASP.NET, I get the "Must
Use Updateable Query" error. I've tried searching and have also tried
setting the permissions on the directory to be as liberal as possible.
Is there another security setting I'm missing? Or is there an
incompatibility with my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder] ([CustomerID],
[Subtotal], [Tax], [Discount], [ShippingMethod], [ShippingCost],
[Total], [OrderDate], [ShipName], [ShipAddress], [ShipCity],
[ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6, 190, 10.2885, 9.5,
""Express"", 10, 200.7885, ""1/15/2005 9:53:29 PM"", ""Joe Mocling"",
"""", ""Atlanta"", ""GA"", """", """", ""1/1/2005 12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()



Nov 19 '05 #6
How do I differentiate who gets which rights? How do I set those individual
user rights over directories? Remember, I'm on a Windows XP Pro box.

Thanks

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uU****************@TK2MSFTNGP09.phx.gbl...
Michael,

The account that you must give read/change/write
permissions to is the ASPNET account, not the
IUSR_ Administrator nor the IUSR_ MachineName account.

Make sure you don't only give those rights over the .mdb file.

You need to give those rights to the ASPNET account
over the *directory* where the Access .mdb file is located.


Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
Thanks Ken, I found that link on a previous search. I've configured the
settings on this box and the web directory to be as liberal as possible,
but nothing seems to be working. I've changed the security settings in
IIS to allow everything and even gave the IUSR_ Administrator rights to
see if that was an issue. On the properties box in Windows Explorer for
the folder, I've allowed everything!

What security settings am I missing and how in the world can I set them
in XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ue****************@TK2MSFTNGP12.phx.gbl...
Hi Michael,

This is usually caused by the current user - ASP.NET not having
sufficient privileges in the directory where the .mdb file is located.
Access needs to create a locking file when it is run... that requires
change permissions on the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and
VS.NET 2003. I run SELECT queries from ASP.NET against it all day
long, and when I run the INSERT query inside Access itself, it works
fine. But for some reason when I run it from within ASP.NET, I get the
"Must Use Updateable Query" error. I've tried searching and have also
tried setting the permissions on the directory to be as liberal as
possible. Is there another security setting I'm missing? Or is there
an incompatibility with my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER
ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder]
([CustomerID], [Subtotal], [Tax], [Discount], [ShippingMethod],
[ShippingCost], [Total], [OrderDate], [ShipName], [ShipAddress],
[ShipCity], [ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6, 190,
10.2885, 9.5, ""Express"", 10, 200.7885, ""1/15/2005 9:53:29 PM"",
""Joe Mocling"", """", ""Atlanta"", ""GA"", """", """", ""1/1/2005
12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()



Nov 19 '05 #7
All tables have a Primary Key, including the one table in this query.

Thanks

"Jeff Louie" <je********@yahoo.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
This is also a common message generated when the table does not have a
primary key.

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #8
Hmm. I would, but I loaded up the app in VS.NET this morning and it's
suddenly not working *at all*. Apparently I f*** up the configuration it
needs to even do the half-@$$ job it was doing last night.

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:u9****************@TK2MSFTNGP12.phx.gbl...
Are you giving those rights to the correct user? If Anonymous isn't
allowed, this should tell you who you are dealing with:

Response.Write(Web.HttpContext.Current.User.Identi ty.Name)

Ken

"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
Thanks Ken, I found that link on a previous search. I've configured the
settings on this box and the web directory to be as liberal as possible,
but nothing seems to be working. I've changed the security settings in
IIS to allow everything and even gave the IUSR_ Administrator rights to
see if that was an issue. On the properties box in Windows Explorer for
the folder, I've allowed everything!

What security settings am I missing and how in the world can I set them
in XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ue****************@TK2MSFTNGP12.phx.gbl...
Hi Michael,

This is usually caused by the current user - ASP.NET not having
sufficient privileges in the directory where the .mdb file is located.
Access needs to create a locking file when it is run... that requires
change permissions on the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and
VS.NET 2003. I run SELECT queries from ASP.NET against it all day
long, and when I run the INSERT query inside Access itself, it works
fine. But for some reason when I run it from within ASP.NET, I get the
"Must Use Updateable Query" error. I've tried searching and have also
tried setting the permissions on the directory to be as liberal as
possible. Is there another security setting I'm missing? Or is there
an incompatibility with my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER
ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder]
([CustomerID], [Subtotal], [Tax], [Discount], [ShippingMethod],
[ShippingCost], [Total], [OrderDate], [ShipName], [ShipAddress],
[ShipCity], [ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6, 190,
10.2885, 9.5, ""Express"", 10, 200.7885, ""1/15/2005 9:53:29 PM"",
""Joe Mocling"", """", ""Atlanta"", ""GA"", """", """", ""1/1/2005
12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()


Nov 19 '05 #9
Oh yeah, Anonymous Access is allowed.

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:u9****************@TK2MSFTNGP12.phx.gbl...
Are you giving those rights to the correct user? If Anonymous isn't
allowed, this should tell you who you are dealing with:

Response.Write(Web.HttpContext.Current.User.Identi ty.Name)

Ken

"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
Thanks Ken, I found that link on a previous search. I've configured the
settings on this box and the web directory to be as liberal as possible,
but nothing seems to be working. I've changed the security settings in
IIS to allow everything and even gave the IUSR_ Administrator rights to
see if that was an issue. On the properties box in Windows Explorer for
the folder, I've allowed everything!

What security settings am I missing and how in the world can I set them
in XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ue****************@TK2MSFTNGP12.phx.gbl...
Hi Michael,

This is usually caused by the current user - ASP.NET not having
sufficient privileges in the directory where the .mdb file is located.
Access needs to create a locking file when it is run... that requires
change permissions on the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and
VS.NET 2003. I run SELECT queries from ASP.NET against it all day
long, and when I run the INSERT query inside Access itself, it works
fine. But for some reason when I run it from within ASP.NET, I get the
"Must Use Updateable Query" error. I've tried searching and have also
tried setting the permissions on the directory to be as liberal as
possible. Is there another security setting I'm missing? Or is there
an incompatibility with my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER
ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder]
([CustomerID], [Subtotal], [Tax], [Discount], [ShippingMethod],
[ShippingCost], [Total], [OrderDate], [ShipName], [ShipAddress],
[ShipCity], [ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6, 190,
10.2885, 9.5, ""Express"", 10, 200.7885, ""1/15/2005 9:53:29 PM"",
""Joe Mocling"", """", ""Atlanta"", ""GA"", """", """", ""1/1/2005
12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()


Nov 19 '05 #10
GO figure. I re-booted the machine and it *appears* to be working the way
it's supposed to...
WTF?

Thanks!

"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
Question - I keep getting the above error when I try to run an INSERT
query against an Access database. I'm running XP Professional and VS.NET
2003. I run SELECT queries from ASP.NET against it all day long, and when
I run the INSERT query inside Access itself, it works fine. But for some
reason when I run it from within ASP.NET, I get the "Must Use Updateable
Query" error. I've tried searching and have also tried setting the
permissions on the directory to be as liberal as possible. Is there
another security setting I'm missing? Or is there an incompatibility with
my query? Or some other problem?

TIA.

Here's my code:

Dim Con As New OleDb.OleDbConnection
("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER ID=Admin;PASSWORD=;")
Con.Open()
Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder] ([CustomerID],
[Subtotal], [Tax], [Discount], [ShippingMethod], [ShippingCost], [Total],
[OrderDate], [ShipName], [ShipAddress], [ShipCity], [ShipState],
[ShipZIP], [CCNum], [CCExp]) VALUES (6, 190, 10.2885, 9.5, ""Express"",
10, 200.7885, ""1/15/2005 9:53:29 PM"", ""Joe Mocling"", """",
""Atlanta"", ""GA"", """", """", ""1/1/2005 12:00:00 AM"")", Con)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Con.Close()
Cmd.Dispose()

Nov 19 '05 #11
Oh, it is just one of those "computer things". <grin>

"Michael C#" <xy*@abcdef.com> wrote in message
news:bE*****************@fe08.lga...
GO figure. I re-booted the machine and it *appears* to be working the way
it's supposed to...
WTF?


Nov 19 '05 #12
Yeah it had me a little worried when I tried to run the thing and the parts
that worked fine last night suddenly didn't work this morning...

Thanks,

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:Ow******************@TK2MSFTNGP12.phx.gbl...
Oh, it is just one of those "computer things". <grin>

"Michael C#" <xy*@abcdef.com> wrote in message
news:bE*****************@fe08.lga...
GO figure. I re-booted the machine and it *appears* to be working the
way it's supposed to...
WTF?

Nov 19 '05 #13
re:
How do I set those individual user rights over directories?
If I remember correctly, Windows XP Pro uses NTFS
permissions, right ?

Just open your Windows Explorer, go to the physical directory
where your .mdb file is stored, right-click on the directory name,
anjd select the security tab so that you can assign permissions.

You should be able to select the YourMachineName\ASPNET
account from the list of user accounts in your computer.

If there isn't a "YourMachineName\ASPNET" user account,
you can create it and then assign the directory access rights
( they are "Read, Change and Write" ), but the account should
have been created when you installed ASP.NET.

Try it and let us know what happens.

Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:kg*****************@fe08.lga... How do I differentiate who gets which rights? How do I set those
individual user rights over directories? Remember, I'm on a Windows XP
Pro box.

Thanks

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uU****************@TK2MSFTNGP09.phx.gbl...
Michael,

The account that you must give read/change/write
permissions to is the ASPNET account, not the
IUSR_ Administrator nor the IUSR_ MachineName account.

Make sure you don't only give those rights over the .mdb file.

You need to give those rights to the ASPNET account
over the *directory* where the Access .mdb file is located.


Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
Thanks Ken, I found that link on a previous search. I've configured the
settings on this box and the web directory to be as liberal as possible,
but nothing seems to be working. I've changed the security settings in
IIS to allow everything and even gave the IUSR_ Administrator rights to
see if that was an issue. On the properties box in Windows Explorer for
the folder, I've allowed everything!

What security settings am I missing and how in the world can I set them
in XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ue****************@TK2MSFTNGP12.phx.gbl...
Hi Michael,

This is usually caused by the current user - ASP.NET not having
sufficient privileges in the directory where the .mdb file is located.
Access needs to create a locking file when it is run... that requires
change permissions on the file and directory.

http://support.microsoft.com/default...b;en-us;316675
"Michael C#" <xy*@abcdef.com> wrote in message
news:8Z*****************@fe08.lga...
> Question - I keep getting the above error when I try to run an INSERT
> query against an Access database. I'm running XP Professional and
> VS.NET 2003. I run SELECT queries from ASP.NET against it all day
> long, and when I run the INSERT query inside Access itself, it works
> fine. But for some reason when I run it from within ASP.NET, I get the
> "Must Use Updateable Query" error. I've tried searching and have also
> tried setting the permissions on the directory to be as liberal as
> possible. Is there another security setting I'm missing? Or is there
> an incompatibility with my query? Or some other problem?
>
> TIA.
>
> Here's my code:
>
> Dim Con As New OleDb.OleDbConnection
> ("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
> SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER
> ID=Admin;PASSWORD=;")
> Con.Open()
> Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder]
> ([CustomerID], [Subtotal], [Tax], [Discount], [ShippingMethod],
> [ShippingCost], [Total], [OrderDate], [ShipName], [ShipAddress],
> [ShipCity], [ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6, 190,
> 10.2885, 9.5, ""Express"", 10, 200.7885, ""1/15/2005 9:53:29 PM"",
> ""Joe Mocling"", """", ""Atlanta"", ""GA"", """", """", ""1/1/2005
> 12:00:00 AM"")", Con)
> Cmd.ExecuteNonQuery()
> Cmd.Dispose()
> Con.Close()
> Cmd.Dispose()
>



Nov 19 '05 #14
XP Pro doesn't work that way, at least if you're not logged into a Domain.
XP Pro allows you to set Read Only and Hidden attributes and the Sharing
stuff... that's about it from Explorer.

From IIS Admin panel it lets you do some more, although setting individual
permissions like on 2000 and 2003 Server doesn't seem to be allowed...
Regardless, I gave the ASPNET and IUSR_ Administrator rights, so they should
be able to access *everything* right?

BTW, I re-booted the machine and it appears to be working now.

Microsoft: "When in doubt, re-boot"

Thanks

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O3****************@TK2MSFTNGP09.phx.gbl...
re:
How do I set those individual user rights over directories?


If I remember correctly, Windows XP Pro uses NTFS
permissions, right ?

Just open your Windows Explorer, go to the physical directory
where your .mdb file is stored, right-click on the directory name,
anjd select the security tab so that you can assign permissions.

You should be able to select the YourMachineName\ASPNET
account from the list of user accounts in your computer.

If there isn't a "YourMachineName\ASPNET" user account,
you can create it and then assign the directory access rights
( they are "Read, Change and Write" ), but the account should
have been created when you installed ASP.NET.

Try it and let us know what happens.

Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:kg*****************@fe08.lga...
How do I differentiate who gets which rights? How do I set those
individual user rights over directories? Remember, I'm on a Windows XP
Pro box.

Thanks

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uU****************@TK2MSFTNGP09.phx.gbl...
Michael,

The account that you must give read/change/write
permissions to is the ASPNET account, not the
IUSR_ Administrator nor the IUSR_ MachineName account.

Make sure you don't only give those rights over the .mdb file.

You need to give those rights to the ASPNET account
over the *directory* where the Access .mdb file is located.


Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
Thanks Ken, I found that link on a previous search. I've configured
the settings on this box and the web directory to be as liberal as
possible, but nothing seems to be working. I've changed the security
settings in IIS to allow everything and even gave the IUSR_
Administrator rights to see if that was an issue. On the properties
box in Windows Explorer for the folder, I've allowed everything!

What security settings am I missing and how in the world can I set them
in XP Pro?

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in
message news:ue****************@TK2MSFTNGP12.phx.gbl...
> Hi Michael,
>
> This is usually caused by the current user - ASP.NET not having
> sufficient privileges in the directory where the .mdb file is located.
> Access needs to create a locking file when it is run... that requires
> change permissions on the file and directory.
>
> http://support.microsoft.com/default...b;en-us;316675
>
>
> "Michael C#" <xy*@abcdef.com> wrote in message
> news:8Z*****************@fe08.lga...
>> Question - I keep getting the above error when I try to run an INSERT
>> query against an Access database. I'm running XP Professional and
>> VS.NET 2003. I run SELECT queries from ASP.NET against it all day
>> long, and when I run the INSERT query inside Access itself, it works
>> fine. But for some reason when I run it from within ASP.NET, I get
>> the "Must Use Updateable Query" error. I've tried searching and have
>> also tried setting the permissions on the directory to be as liberal
>> as possible. Is there another security setting I'm missing? Or is
>> there an incompatibility with my query? Or some other problem?
>>
>> TIA.
>>
>> Here's my code:
>>
>> Dim Con As New OleDb.OleDbConnection
>> ("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
>> SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER
>> ID=Admin;PASSWORD=;")
>> Con.Open()
>> Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder]
>> ([CustomerID], [Subtotal], [Tax], [Discount], [ShippingMethod],
>> [ShippingCost], [Total], [OrderDate], [ShipName], [ShipAddress],
>> [ShipCity], [ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6,
>> 190, 10.2885, 9.5, ""Express"", 10, 200.7885, ""1/15/2005 9:53:29
>> PM"", ""Joe Mocling"", """", ""Atlanta"", ""GA"", """", """",
>> ""1/1/2005 12:00:00 AM"")", Con)
>> Cmd.ExecuteNonQuery()
>> Cmd.Dispose()
>> Con.Close()
>> Cmd.Dispose()
>>
>



Nov 19 '05 #15
re:
I gave the ASPNET ... rights
That's all you needed to do.
Glad you worked it out!

Just as an afterthought, rebooting the machine is overkill
many times, although if you have a memory shortage or
if you have installation updates pending it might be
necessary to reboot.

Most of the time, opening a CMD window and running
"iisreset" turns the trick, if the problem is iis-based.

Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:dh****************@fe08.lga... XP Pro doesn't work that way, at least if you're not logged into a Domain.
XP Pro allows you to set Read Only and Hidden attributes and the Sharing
stuff... that's about it from Explorer.

From IIS Admin panel it lets you do some more, although setting individual
permissions like on 2000 and 2003 Server doesn't seem to be allowed...
Regardless, I gave the ASPNET and IUSR_ Administrator rights, so they
should be able to access *everything* right?

BTW, I re-booted the machine and it appears to be working now.

Microsoft: "When in doubt, re-boot"

Thanks "Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O3****************@TK2MSFTNGP09.phx.gbl...
re:
How do I set those individual user rights over directories?


If I remember correctly, Windows XP Pro uses NTFS
permissions, right ?

Just open your Windows Explorer, go to the physical directory
where your .mdb file is stored, right-click on the directory name,
anjd select the security tab so that you can assign permissions.

You should be able to select the YourMachineName\ASPNET
account from the list of user accounts in your computer.

If there isn't a "YourMachineName\ASPNET" user account,
you can create it and then assign the directory access rights
( they are "Read, Change and Write" ), but the account should
have been created when you installed ASP.NET.

Try it and let us know what happens.

Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:kg*****************@fe08.lga...
How do I differentiate who gets which rights? How do I set those
individual user rights over directories? Remember, I'm on a Windows XP
Pro box.

Thanks

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uU****************@TK2MSFTNGP09.phx.gbl...
Michael,

The account that you must give read/change/write
permissions to is the ASPNET account, not the
IUSR_ Administrator nor the IUSR_ MachineName account.

Make sure you don't only give those rights over the .mdb file.

You need to give those rights to the ASPNET account
over the *directory* where the Access .mdb file is located.


Juan T. Llibre
ASP.NET MVP
===========
"Michael C#" <xy*@abcdef.com> wrote in message
news:GA*****************@fe08.lga...
> Thanks Ken, I found that link on a previous search. I've configured
> the settings on this box and the web directory to be as liberal as
> possible, but nothing seems to be working. I've changed the security
> settings in IIS to allow everything and even gave the IUSR_
> Administrator rights to see if that was an issue. On the properties
> box in Windows Explorer for the folder, I've allowed everything!
>
> What security settings am I missing and how in the world can I set
> them in XP Pro?
>
> Thanks
>
> "Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in
> message news:ue****************@TK2MSFTNGP12.phx.gbl...
>> Hi Michael,
>>
>> This is usually caused by the current user - ASP.NET not having
>> sufficient privileges in the directory where the .mdb file is
>> located. Access needs to create a locking file when it is run... that
>> requires change permissions on the file and directory.
>>
>> http://support.microsoft.com/default...b;en-us;316675
>>
>>
>> "Michael C#" <xy*@abcdef.com> wrote in message
>> news:8Z*****************@fe08.lga...
>>> Question - I keep getting the above error when I try to run an
>>> INSERT query against an Access database. I'm running XP
>>> Professional and VS.NET 2003. I run SELECT queries from ASP.NET
>>> against it all day long, and when I run the INSERT query inside
>>> Access itself, it works fine. But for some reason when I run it from
>>> within ASP.NET, I get the "Must Use Updateable Query" error. I've
>>> tried searching and have also tried setting the permissions on the
>>> directory to be as liberal as possible. Is there another security
>>> setting I'm missing? Or is there an incompatibility with my query?
>>> Or some other problem?
>>>
>>> TIA.
>>>
>>> Here's my code:
>>>
>>> Dim Con As New OleDb.OleDbConnection
>>> ("PROVIDER="Microsoft.Jet.OLEDB.4.0;DATA
>>> SOURCE=""C:\InetPub\wwwroot\Test1\STORE.MDB"";USER
>>> ID=Admin;PASSWORD=;")
>>> Con.Open()
>>> Dim Cmd As New OleDb.OleDbCommand("INSERT INTO [tblOrder]
>>> ([CustomerID], [Subtotal], [Tax], [Discount], [ShippingMethod],
>>> [ShippingCost], [Total], [OrderDate], [ShipName], [ShipAddress],
>>> [ShipCity], [ShipState], [ShipZIP], [CCNum], [CCExp]) VALUES (6,
>>> 190, 10.2885, 9.5, ""Express"", 10, 200.7885, ""1/15/2005 9:53:29
>>> PM"", ""Joe Mocling"", """", ""Atlanta"", ""GA"", """", """",
>>> ""1/1/2005 12:00:00 AM"")", Con)
>>> Cmd.ExecuteNonQuery()
>>> Cmd.Dispose()
>>> Con.Close()
>>> Cmd.Dispose()
>>>
>>
>
>



Nov 19 '05 #16
When you are using Windows XP Pro and it is not joined to a domain, it
defaults to using simple file sharing and security. You can disabled this
and used advanced file sharing and security by going to "Control
Panel"-->"Folder Options" and click on the "View" tab. At the bottom of the
list, uncheck the option "Use simple file sharing (Recommended)" and this
will allow you to manage the permissions on files and folders.

"Michael C#" wrote:
Yeah it had me a little worried when I tried to run the thing and the parts
that worked fine last night suddenly didn't work this morning...

Thanks,

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:Ow******************@TK2MSFTNGP12.phx.gbl...
Oh, it is just one of those "computer things". <grin>

"Michael C#" <xy*@abcdef.com> wrote in message
news:bE*****************@fe08.lga...
GO figure. I re-booted the machine and it *appears* to be working the
way it's supposed to...
WTF?


Nov 19 '05 #17
THANK YOU!

I've been wondering how to do that!

Mike C#

"CostIndustries" <Co************@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
When you are using Windows XP Pro and it is not joined to a domain, it
defaults to using simple file sharing and security. You can disabled this
and used advanced file sharing and security by going to "Control
Panel"-->"Folder Options" and click on the "View" tab. At the bottom of
the
list, uncheck the option "Use simple file sharing (Recommended)" and this
will allow you to manage the permissions on files and folders.

"Michael C#" wrote:
Yeah it had me a little worried when I tried to run the thing and the
parts
that worked fine last night suddenly didn't work this morning...

Thanks,

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:Ow******************@TK2MSFTNGP12.phx.gbl...
> Oh, it is just one of those "computer things". <grin>
>
> "Michael C#" <xy*@abcdef.com> wrote in message
> news:bE*****************@fe08.lga...
>> GO figure. I re-booted the machine and it *appears* to be working the
>> way it's supposed to...
>> WTF?
>


Nov 19 '05 #18

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

Similar topics

8
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...
6
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...
4
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 =...
606
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...
4
by: Jim in Arizona | last post by:
Continuing my lessons out of a book, I ran into a problem when trying for the first time to update a datastore (access database in this case). My Code: Private Sub Page_Load(ByVal sender As...
2
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...
5
by: Web Search Store | last post by:
I'm getting this error on my web page: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Operation must use an updateable query. /searchweb33.asp, line 5014 Here is the...
8
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: ========================================================...
11
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...
1
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.