sql query with fieldName as variable name
peter salomon
peter.salomon at gmx.net
Tue May 31 12:51:50 CDT 2005
Hi Paolo,
this is a lingo question i think, not valentina.
i´m not sure what you want to do, of course you can store anything in
global variables, also fieldnnames. You do it by defining it:
global gFieldName
then you put something into it:
gFieldName = "fldAnyName"
if you want to build an sql string you can construct it as:
"SELECT RecID, * FROM students WHERE" && gFieldName && "= '" & searchString &
"'"
you need a field in your table named "fldAnyName" and
searchstring must be a local or global variable containing a string..
is that what you wanted to know?
Peter
info at vallemediatime.com wrote:
>Hi Ruslan,
>I will keep the fieldname as global variable name, how can I write it?
>
>global fieldName
>query = "SELECT RecID, * from STUDENTS WHERE fieldName = '" & searchString &
>"'"
>
>I've tried with:
>query = "SELECT RecID, * from STUDENTS WHERE 'fieldName' = '" & searchString
>& "'" and other forms
>but I don't try the right way...
>
>P.S. Thank Peter for the "nil" answer :-)
>
>
>
More information about the Valentina
mailing list