Re: Addnew method failed on empty recordset
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 08:00:52 -0600
"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:2p6dnZO1R6Pf8tDanZ2dnUVZ_g2dnZ2d@xxxxxxxxxxxxxxx
"Max" <Max@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:227F59E9-BEC3-4D3E-9721-06FE7908D989@xxxxxxxxxxxxxxxx
Hi i am having table Data with field name code, Data Table is empty,showing
when i tried to Addnew, Update method through ADO it fails it is not
any records ?
my syntex is
dim i as integer
cn.open path
rs.open "Data",cn,adOpenDynamic, adLockBatchOptimistic
thanx
for i=1 to 100
rs.addnew
rs!code= i
next
Add a line as follows ...
For i=1 To 100
rs.AddNew
rs!code = i
rs.Update ' - Add this line
Next
Oops!
<snipped>
It is also possible that you're not using the correct cursor to have an
"updateable" recordset. You can use the Supports() method to determine
this...
http://docs.sun.com/source/817-2514-10/Ch11_ADO101.html#wp1091178
It is not the cursor but the locktype that has the most effect on
"updateability". And I belatedly noticed your constants are OK. But the
Supports() method is handy if you weren't aware of it before. <g>
-ralph
.
- References:
- Re: Addnew method failed on empty recordset
- From: Ralph
- Re: Addnew method failed on empty recordset
- Prev by Date: Re: Addnew method failed on empty recordset
- Next by Date: Re: Addnew method failed on empty recordset
- Previous by thread: Re: Addnew method failed on empty recordset
- Next by thread: Re: Addnew method failed on empty recordset
- Index(es):
Relevant Pages
|
|