Checkboxlist and database - Input needed

Discussion in 'ASP .Net Web Controls' started by VK, Feb 18, 2005.

  1. VK

    VK Guest

    Hi:

    Would this work: Trying to insert selected checkboxlist values into
    database.

    For iBio = 0 To CheckBoxList1.Items.Count - 1
    If CheckBoxList1.Items(iBio).Selected Then
    sqlinsert = "INSERT INTO tProposal_x_manager (doc_num, manager_id)
    VALUES("
    sqlinsert = sqlinsert & doc_num & ","
    sqlinsert = sqlinsert & CheckBoxList1.Items(iBio).Value & ")"
    myComm1.ExecuteNonQuery()
    End If
    Next iBio

    Would this work - or would these values have to be stored as string and
    parsed and inserted into database?

    many thanks



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    VK, Feb 18, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wjer
    Replies:
    1
    Views:
    486
    Alvin Bruney [MVP]
    Mar 2, 2004
  2. JD
    Replies:
    5
    Views:
    11,644
    NetArchitect
    Aug 8, 2007
  3. Patrick.O.Ige
    Replies:
    5
    Views:
    19,103
    Patrick.O.Ige
    Jun 19, 2005
  4. dealkk
    Replies:
    0
    Views:
    476
    dealkk
    Jul 26, 2005
  5. Renie83
    Replies:
    2
    Views:
    233
Loading...

Share This Page