Passing variable to Frontpage SQL query

E

Emmett Power

Hi Guys,

I have read a lot of postings and articles about this problem but I
still haven't been able to crack it.

I want to populate a table with results from a database dependent upon
the identity of the user - a common enough issue. But I can't seem to
get the user's name to the pass as a valid variable to SQL.

The relevant part of the query as generated by the Wizard and manually
ammended by me (both grey and red text) is as follows:

fp_sQry="SELECT etc WHERE FamilyDetails.FamilyName = '" & varFamily &
"'"

The problem is what occurs after the '=' sign. I have tried a number
of ways of passing the value to the query.

I have got the closest with defining a variable 'VarFamily', defining
it as a cookie value and inserting that into the query.

The problem is that in FP SQL keeps treating the first quotation mark
as the end of the statement to be evaluated rather than taking the
variable and returns an error message.

This variation is accepted but returns no records:

WHERE (FamilyDetails.FamilyName = '& varFamily &' )"

I've tried lots of different ways none of which have worked.

Any suggestions would be most appreciated.

Thanks

Emmett Power
 
G

grw

Try using the Spooky Diet at www.outfront.net/spooky/
This will allow you to manually change the DRW without any web bot concerns.
I assume that you have requested the value of the variable or given it a
value?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top