Re: executeQuery Can't pass variable to SQL. :-( Why?

From: Dave Milne <jeep_at__nospam_milne.info>
Date: Wed, 20 Aug 2003 22:19:45 GMT
Message-ID: <nps7kv82lgrasuvtthr7f80mgmqgr24h74_at_4ax.com>


You are most welcome.

Dave.

On 19 Aug 2003 13:18:02 -0700, nelson.broat_at_mail.cuny.edu (Nelson Broat) wrote:

>"Dave Milne" <jeep_at__nospam_milne.info> wrote in message news:<jI3Za.1322$Ic.11076832_at_news-text.cableinet.net>...
>> Hi Nelson
>>
>>You have got a <%= nested inside a <% - can't do that.
>>I'm afraid I don't understand what you are trying to do, so can't be
 of much
>>more help. There doesn't seem to be much point in your recordKey
 variable -
>>you could just do
>> String sql = "SELECT * FROM db.db WHERE db.column = 99"
>>just as well.
>>If you want to keep your variable, then do this:
>> String sql = "SELECT * FROM db.db WHERE db.column = " + recordKey ;
>
>Thanks Dave! That was it. I was trying so many different variations
>that I didn't try the most simplest one of all. :-) Well...actually...
>I thought I had, but I bet I put that damn quote in the wrong place to
>start with. Then, of course, I traveled on my tagents while pulling my
>head out of my hair! :-)
>
>Thanks again,
>
>Nelson

Dave Milne, Scotland
'99 TJ Sahara Received on Thu Aug 21 2003 - 00:19:45 CEST

Original text of this message