Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    4

    Unanswered: Cerating and updating new record using ADO

    Hi, i want to create new record in remote accsess db using ADO. I'm using this code:


    VB:
    --------------------------------------------------------------------------------
    Dim cnn As ADODB.Connection
    Dim rs As ADODB.Recordset

    Set cnn = New ADODB.Connection
    Set rs = New ADODB.Recordset

    cnn.Open "Provider=MS Remote;Remote Server=http://www.xyz.com;" & "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=c:\Inetpub\wwwroot\biblio.mdb;"
    rs.Open "SELECT * From USERS", cnn, adOpenKeyset, adLockOptimistic, adCmdText


    rs.AddNew
    rs("Name") = "Jon"
    rs("PhoneNR") = "00375221"
    rs.Update
    --------------------------------------------------------------------------------



    error apears when i updating recrodset:

    '-21474671259' operation must use an updateable query

    Why ????

  2. #2
    Join Date
    Oct 2003
    Posts
    1

    Re: Cerating and updating new record using ADO

    Originally posted by fizikas
    Hi, i want to create new record in remote accsess db using ADO. I'm using this code:


    VB:
    --------------------------------------------------------------------------------
    Dim cnn As ADODB.Connection
    Dim rs As ADODB.Recordset

    Set cnn = New ADODB.Connection
    Set rs = New ADODB.Recordset

    cnn.Open "Provider=MS Remote;Remote Server=http://www.xyz.com;" & "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=c:\Inetpub\wwwroot\biblio.mdb;"
    rs.Open "SELECT * From USERS", cnn, adOpenKeyset, adLockOptimistic, adCmdText


    rs.AddNew
    rs("Name") = "Jon"
    rs("PhoneNR") = "00375221"
    rs.Update
    --------------------------------------------------------------------------------



    error apears when i updating recrodset:

    '-21474671259' operation must use an updateable query

    Why ????




    see the following article:

    http://support.microsoft.com/default...b;en-us;175168

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •