4 Replies - 4508 Views - Last Post: 26 August 2012 - 06:34 AM Rate Topic: -----

#1 sahilwest  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-August 12

Using listbox to enter multiple values with same id into the sql table

Posted 23 August 2012 - 03:48 PM

Hi, I am working on a sharepoint aspx page where i need to select multiple values from a listbox and insert them into the table . I am using a sql datasource which runs an insertquery something like: Insert into mentornotecategory values[noteid,category] select max(noteid) from table2,@category . it runs fine when i have only one selected value but i need to make it work for multiple selections keeping noteid the same and different category depending upon selection from listbox.

can anybody help. Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Using listbox to enter multiple values with same id into the sql table

#2 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 446
  • View blog
  • Posts: 1,501
  • Joined: 28-April 09

Re: Using listbox to enter multiple values with same id into the sql table

Posted 24 August 2012 - 06:08 PM

so all of the selections should have the exact same note id?
Was This Post Helpful? 0
  • +
  • -

#3 sahilwest  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-August 12

Re: Using listbox to enter multiple values with same id into the sql table

Posted 25 August 2012 - 12:02 PM

View PostNakor, on 24 August 2012 - 06:08 PM, said:

so all of the selections should have the exact same note id?


Yes they should have the same noteid but different category according to selection from list box
Was This Post Helpful? 0
  • +
  • -

#4 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 446
  • View blog
  • Posts: 1,501
  • Joined: 28-April 09

Re: Using listbox to enter multiple values with same id into the sql table

Posted 25 August 2012 - 03:14 PM

can you show the code you're using for the entire process right now?
Was This Post Helpful? 0
  • +
  • -

#5 sahilwest  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-August 12

Re: Using listbox to enter multiple values with same id into the sql table

Posted 26 August 2012 - 06:34 AM

View PostNakor, on 25 August 2012 - 03:14 PM, said:

can you show the code you're using for the entire process right now?


Sure let me get to work tomorrow I will post the code
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1