Hi folks,
I've never used an ADO connection on anything more complicated than an
old Access database in the past. Now I am connecting to an SQL2005
database. Within the SQL studio environment I don't have any group
permission restrictions related to the table/fields I am connecting to
- I have Update|Insert|Delete|Select permission; I can change any of
these at will if necessary.
I am able to connect to the table, create a recordset, but I am not
able to update any of the field contents.
Const adUpdate=7
Const adUpdateBatch=8
cn.ConnectionString = sCnString
rsCurTable.Open strSQLSyntax, cn, adOpenKeyset, adLockOptimistic
rsCurTable.Supports(adUpdate)
'** No matter what combination of Cursor types & record lock types I
use I just can't get the Record Set "Supports" method to report a
value of "TRUE"; hence indicating that I am allowed to update the data
with the current connection.
'** Trying the alter the data anyway I am using on of two methods to
alter/update the field data ...
rsCurTable.MoveFirst
'First Method of Updating
rsCurTable.fields(ATTACHBEGFIELD).value=strBegFamProdId
rsCurTable.Update
'** The resulting error occurs for both update approaches ...
Error# 3265: Item cannot be found in the collection corresponding to
the requested name or ordinal. at line 238
'Second Method of Updating - yields same error
rsCurTable.Update ATTACHBEGFIELD,strBegFamProdID
Within the connection string the provider I am using is:
Provider=SQLOLEDB.1;
Integrated Security=SSPI;
password=????????????;
database=????????????;
I don't know if this provider does or doesn't support updates, or if
this is just an obvious mis-configuration which would be obvious to an
experienced DB programmer.
Thanks for any insight.
~Steve
Replies