SQL VARIABLES

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.
 
R

RAW

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.
 

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