VBLady
Newcomer
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! I've tried this:
and I've 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! I've tried this:
Visual Basic:
sQuery = "select myfield from mytable where thisvalue= '" & sMyVariable & "'"
and I've tried:
Visual Basic:
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