Use of updatable query questions

G

Guest

I'm trying to develop an Internet application using an Access database, and
I'm trying to insert records using an insert query. I keep receiving an
error stating that I need to use and updatable query. My insert code is as
follows:


public Int32 InsertContactMessage (String division, String name, String
email,
String phone, String subject, String message) {

m_SQL = "EXECUTE qryInsertNews '"+division+"', '"+name+"', '"+email+"',
'"+phone+"', '"+subject+"', '"+message+"'";

OleDbCommand objCommand = new OleDbCommand(m_SQL, objConnection);
Int32 intResults = 0;

try {
this.CheckConnection ();
objConnection.Open ();
intResults = objCommand.ExecuteNonQuery();
}
catch (Exception ex) {
m_Exception = ex;
}
finally {
objConnection.Close ();
objCommand.Dispose ();
objConnection.Dispose ();
}

return intResults;

}

Any ideas?
 
A

Adam Knight

If i remember correctly, this is very possibly a permissions issue.

The IIS account under which your application is running(ie: your
computer/ASP.NET) needs to have write
access to the directory your database is in..

Cheers,
Adam
 
G

Guest

Even when I add ASPNET to the Administrators group I still receive the same
messages
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top