Passing array to sql query !!!!!!!!!!!!!

Results 1 to 2 of 2

Thread: Passing array to sql query !!!!!!!!!!!!!

  1. #1
    sachin Guest

    Default Passing array to sql query !!!!!!!!!!!!!

    I want to pass an array to a query.The array contains the values of the check boxes which are generated dynamically on the previous page.The values of check boxes are the item codes which i want to compare in the sql query with the codes in the table to retrieve data from the table .Pleaz help me......<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Passing array to sql query !!!!!!!!!!!!!

    if you have the same name for all the checkboxes, then you just have to retreive it as:<BR>chk=request.form("chk")<BR><BR>the values of all the checkboxes that were checked will come ,separated by commas.<BR>so all you need to do is run your query--<BR>if chk&#060;&#062;"" then<BR>"select * from tablename where itemcode in("&chk&")"<BR>end if<BR><BR>this should do 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