Must Use Updateable Query

M

Michael C#

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()
 
M

Michael C#

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 said:
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.aspx?scid=kb;en-us;316675


Michael C# said:
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()
 
J

Juan T. Llibre

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# said:
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 said:
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.aspx?scid=kb;en-us;316675


Michael C# said:
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()
 
J

Jeff Louie

This is also a common message generated when the table does not have a
primary key.

Regards,
Jeff
 
K

Ken Cox [Microsoft MVP]

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.Identity.Name)

Ken

Michael C# said:
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 said:
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.aspx?scid=kb;en-us;316675


Michael C# said:
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()
 
M

Michael C#

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 said:
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# said:
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 said:
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.aspx?scid=kb;en-us;316675


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()
 
M

Michael C#

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 said:
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.Identity.Name)

Ken

Michael C# said:
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 said:
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.aspx?scid=kb;en-us;316675


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()
 
M

Michael C#

Oh yeah, Anonymous Access is allowed.

Thanks

Ken Cox said:
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.Identity.Name)

Ken

Michael C# said:
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 said:
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.aspx?scid=kb;en-us;316675


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()
 
M

Michael C#

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

Thanks!
 
M

Michael C#

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,
 
J

Juan T. Llibre

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# said:
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 said:
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# said:
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

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.aspx?scid=kb;en-us;316675


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()
 
M

Michael C#

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 said:
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# said:
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 said:
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
===========
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

message 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.aspx?scid=kb;en-us;316675


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()
 
J

Juan T. Llibre

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# said:
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 said:
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# said:
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

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
===========
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

message 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.aspx?scid=kb;en-us;316675


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()
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top