Results 1 to 3 of 3

Thread: Memory variable in SQL Statement ???

  1. #1

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81
    I have this code :

    dim mInsurance as integer

    mInsurance = 2

    "select (List.Pay - mInsurance) As TPay From List"

    It returns this message :
    "no value given for one or more parameters"

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    SQL has no idea what mInsurance is - if you want to pass the value of mInsurance to SQL as part of the query use something like this;

    SQLString = "SELECT (list.play - " & mInsurance & ") AS TPay FROM list"

    When it's passed to SQL it will be received at the SQL end like this;

    SELECT (list.play - 2) AS TPay FROM list

    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  3. #3

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81
    Thanx

    You're right....

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