Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with string parameters 1

Status
Not open for further replies.

jwaldner

Programmer
Jan 21, 2011
77
US
I have a report that uses a command to run a query. The command has several string parameters. When I enter the parameters at the query prompt, if I do not put single quotes around the strings I get a database error. I have never run into this before. I have used string parameters before with out running int this. Can anyone point me in the right direction?

I get syntax and other errors if Single Quotes are not used.
 
This is simply a rule for queries entered directly as commands. String parameters (only) have to be surrounded by single quotes. If you were instead using the main report record selection area, there would be no need for quotes.

-LB
 
the problem is the user of the report will not understand why the quotes are needed. Might there be a way around this?
 
You should be placing the quotes around the parameter inside the command. Then the user just responds to the prompts the usual way. Inside the command, you might have, e.g.:

where table.string = '{?parameter}'

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top