Results 1 to 3 of 3

Thread: Variables in SQL statements

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Oak Creek, WI, USA
    Posts
    92

    Post

    How do I include a variable in an SQL statement? ie What is wrong with this one? strQuery = "Select * From JobStatusEntries Where FormNum = FormNumber" I get "No value given for one or more required parameters" when I try to adodc1.refresh the control. Thanks,

    casox

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Here's an example

    SQL = "DELETE FROM SavedSystems WHERE SystemName = " & "'" & sSysName & "'"

    And just in case you can't read it, the symbols around the variable sSysName are a single quote within double-quotes.
    ------------------
    Marty


    [This message has been edited by MartinLiss (edited 01-04-2000).]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Oak Creek, WI, USA
    Posts
    92

    Post

    Martin,

    It works! Thanks much.

    Kim

Posting Permissions

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



Click Here to Expand Forum to Full Width