Results 1 to 2 of 2

Thread: problem in making counter ??

  1. #1

    Thread Starter
    Hyperactive Member xray's Avatar
    Join Date
    Jun 2003
    Location
    EgYpT
    Posts
    312

    Unhappy problem in making counter ??

    peace be with you

    i try to make counter by this code :::

    Code:
    dim add_count,add_rst,nu_vi,nu_vi_add
    set add_rst = server.createobject("adodb.recordset")
    add_rst.open "select * from vi_con where count_id=1",db
    nu_vi=add_rst("vc")
    nu_vi_add=nu_vi+1
    add_count="update vi_con set vc='"+nu_vi_add+"' where count_id=1"
    db.execute (add_count)
    i am open the recodset and after that add " 1 " to the value of the index " 1 " and then execute this add to the db

    but there is error :

    Code:
    Error Type:
    Microsoft VBScript runtime (0x800A000D)
    Type mismatch: '[string: "update vi_con set vc"]'
    /islam/main.asp, line 15
    error in the update statment !!!

    what's wronge
    In the name of allah , the beneficent , the merciful

    Say (O Muhammad ): We believe in allah and that which is revealed unto us and that which was revealed unto abraham and ishmael and isaac and jacob and the tribes , and that which was vouchsafed unto moses and jesus and the prophets from their lord . we make no distinction between any of them , and unto him we have surrendered


    ---- Great Sites For You -------------------

    If you want to know some small things about islam ?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: problem in making counter ??

    If vc is a numeric field, remove the single quotes from around it.

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