Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    7

    Question Unanswered: correct syntax for ADO.net recordset's Select method.

    I have a interger stored in x.

    I want to use x in a SELECT statement like so :

    SELECT * from aTable WHERE A_Column = x

    This select statement is then assigned to and passed as a string like :

    sql = "SELECT * from aTable WHERE A_Column = x"

    How does the x get interpreted correctly ?

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Try:

    sql = "SELECT * from aTable WHERE A_Column = " & x
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •