Must Use Updateable Query

Discussion in 'ASP .Net' started by Michael C#, Jan 16, 2005.

  1. Michael C#

    Michael C# Guest

    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()
     
    Michael C#, Jan 16, 2005
    #1
    1. Advertising

  2. 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#" <> wrote in message
    news:8ZkGd.2079$...
    > 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()
    >
     
    Ken Cox [Microsoft MVP], Jan 16, 2005
    #2
    1. Advertising

  3. Michael C#

    Michael C# Guest

    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]" <> wrote in message
    news:ueIqax3%...
    > 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#" <> wrote in message
    > news:8ZkGd.2079$...
    >> 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()
    >>

    >
     
    Michael C#, Jan 16, 2005
    #3
  4. 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#" <> wrote in message
    news:GAmGd.2087$...
    > 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]" <> wrote in message
    > news:ueIqax3%...
    >> 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#" <> wrote in message
    >> news:8ZkGd.2079$...
    >>> 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()
    >>>

    >>

    >
    >
     
    Juan T. Llibre, Jan 16, 2005
    #4
  5. Michael C#

    Jeff Louie Guest

    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!
     
    Jeff Louie, Jan 16, 2005
    #5
  6. 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#" <> wrote in message
    news:GAmGd.2087$...
    > 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]" <> wrote in message
    > news:ueIqax3%...
    >> 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#" <> wrote in message
    >> news:8ZkGd.2079$...
    >>> 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()
    >>>

    >>

    >
    >
     
    Ken Cox [Microsoft MVP], Jan 16, 2005
    #6
  7. Michael C#

    Michael C# Guest

    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" <> wrote in message
    news:uU2Ap14%...
    > 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#" <> wrote in message
    > news:GAmGd.2087$...
    >> 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]" <> wrote in message
    >> news:ueIqax3%...
    >>> 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#" <> wrote in message
    >>> news:8ZkGd.2079$...
    >>>> 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()
    >>>>
    >>>

    >>
    >>

    >
    >
     
    Michael C#, Jan 16, 2005
    #7
  8. Michael C#

    Michael C# Guest

    All tables have a Primary Key, including the one table in this query.

    Thanks

    "Jeff Louie" <> wrote in message
    news:%23gcwY44%...
    > 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!
     
    Michael C#, Jan 16, 2005
    #8
  9. Michael C#

    Michael C# Guest

    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]" <> wrote in message
    news:u9$Xu08%...
    > 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#" <> wrote in message
    > news:GAmGd.2087$...
    >> 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]" <> wrote in message
    >> news:ueIqax3%...
    >>> 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#" <> wrote in message
    >>> news:8ZkGd.2079$...
    >>>> 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()
    >>>>
    >>>

    >>
    >>

    >
     
    Michael C#, Jan 16, 2005
    #9
  10. Michael C#

    Michael C# Guest

    Oh yeah, Anonymous Access is allowed.

    Thanks

    "Ken Cox [Microsoft MVP]" <> wrote in message
    news:u9$Xu08%...
    > 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#" <> wrote in message
    > news:GAmGd.2087$...
    >> 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]" <> wrote in message
    >> news:ueIqax3%...
    >>> 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#" <> wrote in message
    >>> news:8ZkGd.2079$...
    >>>> 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()
    >>>>
    >>>

    >>
    >>

    >
     
    Michael C#, Jan 16, 2005
    #10
  11. Michael C#

    Michael C# Guest

    Thanks All

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

    Thanks!

    "Michael C#" <> wrote in message
    news:8ZkGd.2079$...
    > 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()
    >
     
    Michael C#, Jan 16, 2005
    #11
  12. Re: Thanks All

    Oh, it is just one of those "computer things". <grin>

    "Michael C#" <> wrote in message
    news:bEwGd.2174$...
    > GO figure. I re-booted the machine and it *appears* to be working the way
    > it's supposed to...
    > WTF?
     
    Ken Cox [Microsoft MVP], Jan 16, 2005
    #12
  13. Michael C#

    Michael C# Guest

    Re: Thanks All

    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]" <> wrote in message
    news:OwWjkq%23%...
    > Oh, it is just one of those "computer things". <grin>
    >
    > "Michael C#" <> wrote in message
    > news:bEwGd.2174$...
    >> GO figure. I re-booted the machine and it *appears* to be working the
    >> way it's supposed to...
    >> WTF?

    >
     
    Michael C#, Jan 16, 2005
    #13
  14. 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#" <> wrote in message
    news:kgwGd.2167$...
    > 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" <> wrote in message
    > news:uU2Ap14%...
    >> 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#" <> wrote in message
    >> news:GAmGd.2087$...
    >>> 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]" <> wrote in message
    >>> news:ueIqax3%...
    >>>> 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#" <> wrote in message
    >>>> news:8ZkGd.2079$...
    >>>>> 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()
    >>>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Juan T. Llibre, Jan 16, 2005
    #14
  15. Michael C#

    Michael C# Guest

    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" <> wrote in message
    news:O3xx6L$%...
    > 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#" <> wrote in message
    > news:kgwGd.2167$...
    >> 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" <> wrote in message
    >> news:uU2Ap14%...
    >>> 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#" <> wrote in message
    >>> news:GAmGd.2087$...
    >>>> 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]" <> wrote in
    >>>> message news:ueIqax3%...
    >>>>> 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#" <> wrote in message
    >>>>> news:8ZkGd.2079$...
    >>>>>> 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()
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Michael C#, Jan 16, 2005
    #15
  16. 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#" <> wrote in message
    news:dhzGd.2192$...
    > 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" <> wrote in message
    > news:O3xx6L$%...
    >> 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#" <> wrote in message
    >> news:kgwGd.2167$...
    >>> 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" <> wrote in message
    >>> news:uU2Ap14%...
    >>>> 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#" <> wrote in message
    >>>> news:GAmGd.2087$...
    >>>>> 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]" <> wrote in
    >>>>> message news:ueIqax3%...
    >>>>>> 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#" <> wrote in message
    >>>>>> news:8ZkGd.2079$...
    >>>>>>> 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()
    >>>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Juan T. Llibre, Jan 16, 2005
    #16
  17. Re: Thanks All

    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]" <> wrote in message
    > news:OwWjkq%23%...
    > > Oh, it is just one of those "computer things". <grin>
    > >
    > > "Michael C#" <> wrote in message
    > > news:bEwGd.2174$...
    > >> GO figure. I re-booted the machine and it *appears* to be working the
    > >> way it's supposed to...
    > >> WTF?

    > >

    >
    >
    >
     
    =?Utf-8?B?Q29zdEluZHVzdHJpZXM=?=, Jan 19, 2005
    #17
  18. Michael C#

    Michael C# Guest

    Re: Thanks All

    THANK YOU!

    I've been wondering how to do that!

    Mike C#

    "CostIndustries" <> wrote in message
    news:...
    > 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]" <> wrote in message
    >> news:OwWjkq%23%...
    >> > Oh, it is just one of those "computer things". <grin>
    >> >
    >> > "Michael C#" <> wrote in message
    >> > news:bEwGd.2174$...
    >> >> GO figure. I re-booted the machine and it *appears* to be working the
    >> >> way it's supposed to...
    >> >> WTF?
    >> >

    >>
    >>
    >>
     
    Michael C#, Jan 20, 2005
    #18
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. abdul haleem
    Replies:
    3
    Views:
    433
    Wim Hollebrandse
    Oct 19, 2003
  2. =?Utf-8?B?S2Vu?=

    Operation must use an updateable query Error!!!

    =?Utf-8?B?S2Vu?=, Feb 13, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    1,339
    Hans Kesting
    Feb 13, 2004
  3. =?Utf-8?B?S2Vu?=

    Operation must use an updateable query Error!!!

    =?Utf-8?B?S2Vu?=, Feb 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    345
    =?Utf-8?B?S2Vu?=
    Feb 13, 2004
  4. Alphonse Giambrone

    Re: Operation must use an updateable query.

    Alphonse Giambrone, Apr 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    3,050
    Pravin A. Sable
    Apr 29, 2004
  5. Kevin Spencer

    Re: Operation must use an updateable query.

    Kevin Spencer, Apr 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    633
    Alphonse Giambrone
    Apr 29, 2004
Loading...

Share This Page