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.
 
Hi I have a little problem here with my code Iam asp user and Im trying
to
 
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

Back
Top