VBLady
Member
I need some help with this:
I am trying to build an sql query in a string and I am having a hard time getting the end quote on the string! Ive tried this:
and Ive tried:
BOTH of them result in the following string
select myfield from mytable where thisvalue = thevalueofthevar
With NO end quote!! This is of course causing my sql query to fail. The variable sQuery is long enough. Please help!
Frances
I am trying to build an sql query in a string and I am having a hard time getting the end quote on the string! Ive tried this:
Code:
sQuery = "select myfield from mytable where thisvalue= " & sMyVariable & ""
and Ive tried:
Code:
sQuery = [string].concat("select myfield from mytable where thisvalue = ", sMyVariable, "")
BOTH of them result in the following string
select myfield from mytable where thisvalue = thevalueofthevar
With NO end quote!! This is of course causing my sql query to fail. The variable sQuery is long enough. Please help!
Frances