Results 1 to 4 of 4

Thread: Why won't UPDATE work? [resolved]

  1. #1

    Thread Starter
    Member bjawnie's Avatar
    Join Date
    Sep 2002
    Location
    Denmark, FalSTAR
    Posts
    44

    Why won't UPDATE work? [resolved]

    Hii,

    Why won't this code work? I have been using it to update a datetime field without any probs., but know I get this error when I try to update the IP field:

    Run-Time Error '-2147217887' (80040e21):

    Code:
    Set rs = New ADODB.Recordset
    rs.Open "Select IP FROM m_members where id = " & struser_id & " ", conn, 3, 3
            rs!IP = Winsock1.LocalIP
    rs.Update
    rs.Close
    Set rs = Nothing
    Last edited by bjawnie; Jul 27th, 2003 at 09:25 AM.
    Cheers
    bjawnie

  2. #2

    Thread Starter
    Member bjawnie's Avatar
    Join Date
    Sep 2002
    Location
    Denmark, FalSTAR
    Posts
    44
    I couldn't figure out what the problems was, so I replaced the whole code...
    Cheers
    bjawnie

  3. #3
    Addicted Member
    Join Date
    Jul 2002
    Location
    BC, Canada
    Posts
    152
    My two questions for this problem:

    1) Is the user id a number or string?
    2) Did the record you were searching for exist?

    Okay, 3 questions:

    3) Did the error occur only on the "rs!IP = ..." statement?

    Destined

  4. #4

    Thread Starter
    Member bjawnie's Avatar
    Join Date
    Sep 2002
    Location
    Denmark, FalSTAR
    Posts
    44
    Hii,

    as I wrote my prob. has been resolved and I don't know what caused the error cause I ended up replacing the whole code.

    I think that it might have been the OPTION function in my Connectionstring which I didn't include in the topic
    Cheers
    bjawnie

Posting Permissions

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



Click Here to Expand Forum to Full Width