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