PDA

View Full Version : Deleting records from Access


bruce
01-28-2004, 04:48 AM
John,

Post the error msg.

[b]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">

useaareax
01-28-2004, 09:21 AM
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

useaareax
01-29-2004, 09:39 AM
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