Stings parameters w spaces passed in quotes when scheduled
Posted: Tue Jun 24, 2008 10:20 am
On Windows Server, the AT command is used to schedule jobs on the server. In the process of creating the command, any string parameter containing spaces gets passed with quotes (") around it. This does not happen when running a job manually.
For example, if the value of the parameter is
when run manually, it gets passed as
When run as a scheduled job the value is passed as
Then, if the value is used in a SQL statement, those quotes get treated as part of the value.
Has anyone else run into this and come up with a way to resolve the parameter or strip off the quotes? Obviously some routine that would grab the parameter, check for and strip off the quotes before it gets to the database stage but I haven't come up with a way to intercept the parameter yet.
For example, if the value of the parameter is
Code: Select all
CLIENT SYSTEM
Code: Select all
CLIENT SYSTEM
Code: Select all
"CLIENT SYSTEM"
Has anyone else run into this and come up with a way to resolve the parameter or strip off the quotes? Obviously some routine that would grab the parameter, check for and strip off the quotes before it gets to the database stage but I haven't come up with a way to intercept the parameter yet.