SQL VARIABLES

  • Thread starter Thread starter Sylvain Lafontaine
  • Start date Start date
S

Sylvain Lafontaine

If PAGINA is a char or a varchar field, then you must enclose inside single
quotes:

Replace: WHERE PAGINA = " + Replace(setPagina, "'", "''") + ""
With: WHERE PAGINA = '" + Replace(setPagina, "'", "''") + "'"

Also, in the case that setPagina is emtpy, then something like:

setPagina = Request.QueryString("PAGINA") & ""

The addition of: « & "" » at the end will ensure that setPagina is not empty
or not null.

S. L.
 
THANKS THIS WORK PERFECT

Sylvain Lafontaine said:
If PAGINA is a char or a varchar field, then you must enclose inside single
quotes:

Replace: WHERE PAGINA = " + Replace(setPagina, "'", "''") + ""
With: WHERE PAGINA = '" + Replace(setPagina, "'", "''") + "'"

Also, in the case that setPagina is emtpy, then something like:

setPagina = Request.QueryString("PAGINA") & ""

The addition of: « & "" » at the end will ensure that setPagina is not empty
or not null.

S. L.
 
Back
Top