Hi,
I want to update a db from textboxes, so I created an ado recordset
programatically. I open the recordset as adOpenKeySet and adLockOptimistic.
When I looked at the recordset trhough the Watch window it says:
adOpenStatic, instead of adOpenKeySet. The CursorLocation is set to
adUseClient. If I try to update the information, typing in the textbox I get
a warning that says: Field Not updatable, Bound Property Name: Text, Field
Name: CName1.
I'm guessing its because the recordset is adOpenStatic, but I do not know
why, since I specifically open it as adOpenKeySet. I have tried with the
numeric value and with the name itself, but either way doesn't work, still
appears as adOpenStatic in the watch window.
Any help is appreciated.
Thanks
Mark J. McGinty - 28 May 2005 02:27 GMT
> Hi,
> I want to update a db from textboxes, so I created an ado recordset
[quoted text clipped - 10 lines]
> numeric value and with the name itself, but either way doesn't work, still
> appears as adOpenStatic in the watch window.
Client-side recordsets are always static, but that's ok, be cause static in
and of itself is updateable. The query construction also has to be
updateable, the cursor service has to be able to uniquely identify each row.
Different providers have different capabilities, so you may run into
provider-specific quirks here and there (esp. if you use Jet) but that's the
main prerequisite.
In any case, ADO coerses the cursor type and lock type (along with
90-something dynamic properties) according to what's possible for the
provider
-Mark
> Any help is appreciated.
> Thanks
Adal - 30 May 2005 15:57 GMT
thanks for the response, but I do have a unique ID for each record on the
table. I have defined a identity field. I have also created the same exact
recodset using the ado control, and it works fine, so I do not know why
creating it through code doesn't work.
Thanks.
Jorge Jimenez - 29 May 2005 19:27 GMT
You need to add a key field to your table
and should include your key field in your query.

Signature
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
> Hi,
> I want to update a db from textboxes, so I created an ado recordset
[quoted text clipped - 13 lines]
> Any help is appreciated.
> Thanks
Adal - 30 May 2005 15:59 GMT
Hi jorge, I do have the field and is included in the sql query, I think the
problem is due to something else.
Thanks