Deleting records from Access

Discussion in 'Databases' started by Bruce, Jan 28, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    John,

    Post the error msg.

    quote:Originally posted by useaareax

    All;

    I am able to delete records from my Access 2000 database on the DiscountASP.net server with my website.

    When I run the code on my home computer, where I developed the site, I get a rather ambiguous message saying the I cannot delete records from the table.

    Here is my code snippet:

    Dim deluser As OleDb.OleDbCommand = New OleDb.OleDbCommand("DELETE FROM Details WHERE [User Name] = '" & ListBox2.SelectedValue() & "' ")

    deluser.CommandType = CommandType.Text
    deluser.Connection = oledbconnection1
    deluser.ExecuteNonQuery()

    I am thinking it is something with my IIS on my local machine. Does anyone have any thoughts on this one?

    I have checked the permissions on the .mdb file and Read/Write is there.

    Thanks.

    John
    </blockquote id="quote"></font id="quote">
     
  2. All;

    I am able to delete records from my Access 2000 database on the DiscountASP.net server with my website.

    When I run the code on my home computer, where I developed the site, I get a rather ambiguous message saying the I cannot delete records from the table.

    Here is my code snippet:

    Dim deluser As OleDb.OleDbCommand = New OleDb.OleDbCommand("DELETE FROM Details WHERE [User Name] = '" & ListBox2.SelectedValue() & "' ")

    deluser.CommandType = CommandType.Text
    deluser.Connection = oledbconnection1
    deluser.ExecuteNonQuery()

    I am thinking it is something with my IIS on my local machine. Does anyone have any thoughts on this one?

    I have checked the permissions on the .mdb file and Read/Write is there.

    Thanks.

    John
     
  3. Bruce/All;

    It turned out to be an authority issue with the database directory. I manually added a database directory to the c:\inetpub\wwwroot\<appname> directory and placed my db in it. That directory did not have write authority.

    I used the security tab under that directories properties tab to allow write access to my user.

    Works fine now.

    Thanks for looking.

    John
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page