Re: Addnew method failed on empty recordset




"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,
when i tried to Addnew, Update method through ADO it fails it is not
showing
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

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

hth
-ralph



.



Relevant Pages

  • Re: Addnew method failed on empty recordset
    ... Update method through ADO it fails it is not ... my syntex is ... dim i as integer ...
    (microsoft.public.data.ado)
  • Re: Ado Recordset Update method an Status fields property
    ... Dim sSqlSelect As String ... Dim cnn As ADODB.Connection ... my question it may be this: using Ado .Update method ...
    (microsoft.public.vb.database.ado)
  • Update Method Not Updating Database
    ... I'm new to ASP.NET so I'm probably just missing a simple statement. ... update the SQL database. ... The one books says the update method does everything for you…the other ... Dim dataAdapter As New SqlDataAdapter("SELECT * FROM ...
    (microsoft.public.dotnet.framework)
  • Re: Updating problem
    ... Try passing DataTable instance instead of newSSDS to Update method. ... > created a matching dataset ... > Dim cb As New SqlCommandBuilder ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Database Updating problem
    ... > You aren't calling the Update method of the dataadapter. ... > Add this line right before the line with the messagebox command ... >> Public strConn As String ... >> Dim dsUser As New DataSet ...
    (microsoft.public.dotnet.framework.adonet)