By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,591 Members | 629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,591 IT Pros & Developers. It's quick & easy.

Must Use Updateable Query

P: n/a
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
Share this Question
Share on Google+
17 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.