[AccessD] Open Multiple Instances of a Form and passing a parameter

Heenan, Lambert Lambert.Heenan at chartisinsurance.com
Tue Aug 7 16:11:56 CDT 2012


Well one way to handle that would be to declare a constant for the delimiter that is even more unlikely to appear in the data...

Const ARGDELIM as String = "¢À¢À¢À"

Then just use the Const in constructing the delimited string.

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kenneth Ismert
Sent: Tuesday, August 07, 2012 4:34 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Open Multiple Instances of a Form and passing a parameter

>
> Dan Waters:
> To avoid the argument containing a delimiter character, I use the 'cents'
> character, which hasn't been on anyone's keyboard for many years.
>

Yes, that does make it slightly less likely that your delimiter will be used.

But, I guarantee that if you put that code in a library for common use, someone sooner rather than later will pass data to it with a 'cents'
character, and your code is toast.

It's a bug, pure and simple.

That is why all language parsers require you to quote delimiters inside a string, like "" for VB or '' in SQL.

If you want to stuff parameters in strings with reliability, you have to use library that properly quotes parameter values.

-Ken
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list