User-775831949 posted
I have a code like this to delete all data in table:-
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
AccessDataSource1.Delete()
End Sub
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/Data.mdb"
DeleteCommand="DELETE * FROM [Table1]"
>
</asp:AccessDataSource>
I get this error: System.Data.OleDb.OleDbException: Could not delete from specified tables
For same connection add record is ok, only delete get error. What is wrong with my code ?
Also if I run this SQL DELETE * FROM [Table1] within Access there is no error.
Pls help