I am trying to add a recod to a SQL Server 2008 table using DAO.AddNew. But this is giving me Database readonly err at runtime. Is there a way to overcome this problem?

Below is my code sample.--------------------Option ExplicitDim grsIndexTable As RecordsetDim grsDocTable As RecordsetPublic DBConnection As DatabasePublic oWorkSpace As WorkspacePublic oDbEngine As New PrivDBEnginePublic ErrorLineNum As Integer