Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. s updating multiple rows

s updating multiple rows

Scheduled Pinned Locked Moved Web Development
databasehelpannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neoghy
    wrote on last edited by
    #1

    Actually i have to update some multiple rows at a time in the following code. constr=Application("ConStr") set con_adm=CreateObject("ADODB.Connection") con_adm.open constr This is the connection to the database and then the query which is not executin sql_upd="update csd_order_item set ref_no="&ref_no(i)&",item_desc='"&description(i)&"',unit_price="&price(i)&" where oredr_no="&orderno here orderno is the primary key and against that particular refno all the items will be updated, that means refno and orderno are the candidate key when i am executing set rs=con_adm.execute(sql_upd) it is showing incorrect syntax. please it will be very kind of u if somebody could help me.

    skd

    S 1 Reply Last reply
    0
    • N neoghy

      Actually i have to update some multiple rows at a time in the following code. constr=Application("ConStr") set con_adm=CreateObject("ADODB.Connection") con_adm.open constr This is the connection to the database and then the query which is not executin sql_upd="update csd_order_item set ref_no="&ref_no(i)&",item_desc='"&description(i)&"',unit_price="&price(i)&" where oredr_no="&orderno here orderno is the primary key and against that particular refno all the items will be updated, that means refno and orderno are the candidate key when i am executing set rs=con_adm.execute(sql_upd) it is showing incorrect syntax. please it will be very kind of u if somebody could help me.

      skd

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      neoghy wrote:

      when i am executing set rs=con_adm.execute(sql_upd) it is showing incorrect syntax.

      So dump the generated query and run it manually against your DB. Look for typos, missing spaces, misquoted strings, etc. Then figure out which part of your long string of concatenations broke it.

      ----

      ...the wind blows over it and it is gone, and its place remembers it no more...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups