Results 1 to 4 of 4

Thread: update and delete problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    19

    Exclamation

    How do i update and delete a record from my database?
    Anything wrong with the ones below. I keep getting errors.

    set db = (c:\chalir\smarkpack_pack.mdb)
    db.Execute "UPDATE smartpack SET neutronid = '"& sneutronid&"' AND dateinstalled = '"& sdateinstalled &"' WHERE sidelocation = '"& ssidelocation &"' AND currentuse = '"& scurrentuse &"'

    and
    set db = (c:\chalir\smarkpack_pack.mdb)
    db.Execute "DELETE FROM smartpack WHERE neutronid = '"& sneutronid &"'

    Pls advise. Thanks.
    God bless
    Nigel
    [email protected]

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Hi nigel_chong98

    To sort out your update problem replace the AND's with commas in the Set part eg. UPDATE tbltest set a = 1, b=2, c=3 etc.

    I can't see anything wrong with your delete statement though.

    Hope this helps

    Ian

    [Edited by Ianpbaker on 05-19-2000 at 01:11 PM]
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308
    What kind of error do you get?
    What data type is 'sneutronid'?

  4. #4
    Lively Member
    Join Date
    Jan 1999
    Location
    India
    Posts
    85
    Try giving a space before the WHERE and AND words.
    May be there is problem with string formatting.

    Ramdas

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