I have opened a recordset, passing a SQL statement to the rs.Open method.
The SQL statement is having a WHERE clause to filter specific records. The query is something like:
SELECT * FROM MyTable WHERE OrderNo = 1
The records are coming properly.
But when the user enters values in a form to add a record to the underlying table, my code does:
At that time, I get the error:
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
I have opened the Recordset with these parameters:
rs.Open sqlQuery, dbConn, adOpenStatic
I have also tried changing the above to adOpenDynamic.
But it is not working.
Please tell whether its possible to do an AddNew on a recordset based on a query with a WHERE clause.
I have checked that the table included in the query has a Primary Key defined and this key is being fetched by the SQL statement.
If AddNew is not possible, please suggest an alternative approach, which will also keep this recordset updated. Because I am displaying the values from the recordset into a FlexGrid.