Hi Guys,
I am trying to add a new record to a table in an Access Database, which I have been able to access with no problems. When I try to add a new record, I get the following error:
"Runtime error '3251': Object or provider is not capable of performing requested operation."
Here is how I am opening the recordset.
g_strSQL = "SELECT * from Models"
Set rstModels = New Recordset
rstModels.Open g_strSQL, CN, adOpenDynamic
And here is how I am trying to add a new record.
rstModels.AddNew
rstModels!ModelNumber = g_strModel
rstModels!Profile = g_strProfile
rstModels!DeviceTypeID = g_intDriveType
rstModels.Update
Can someone tell me what I am doing wrong? I am trying to learn and write a program at the same time. Sorry if this seems remedial.
Thanks,
Elena
I am trying to add a new record to a table in an Access Database, which I have been able to access with no problems. When I try to add a new record, I get the following error:
"Runtime error '3251': Object or provider is not capable of performing requested operation."
Here is how I am opening the recordset.
g_strSQL = "SELECT * from Models"
Set rstModels = New Recordset
rstModels.Open g_strSQL, CN, adOpenDynamic
And here is how I am trying to add a new record.
rstModels.AddNew
rstModels!ModelNumber = g_strModel
rstModels!Profile = g_strProfile
rstModels!DeviceTypeID = g_intDriveType
rstModels.Update
Can someone tell me what I am doing wrong? I am trying to learn and write a program at the same time. Sorry if this seems remedial.
Thanks,
Elena