Multiple values into a SQL where clause via VBA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 315hughes
    New Member
    • Nov 2011
    • 44

    Multiple values into a SQL where clause via VBA

    Hi all
    I am using visual studio 2010/vb trying to display data that is based on a value read from a text file.
    Currently i can get it to read a text file with only 1 value and get this value into a label. Then by using a SqlDataSource and setting a parameter in the WHERE clause to use the value from the label, it will display the related data in a data GridView.
    BUT i would like to be able to read multiple values seperated by a , or next row down in the text file and enter these values into a WHERE bookID in (value1,value2, ...)
    How do i go about approaching such a task?
    i hope thier is relevent information
    thanks in advance
  • 315hughes
    New Member
    • Nov 2011
    • 44

    #2
    What i have now come to understand is this can not be done and can only be done by first inserting the text file values into a table and then using those values in the SQL where clause..... so now to learn how to updata a table row based on a text file value.

    Comment

    Working...