vb equiv of asp unescape cmd?

I

Irvin Amoraal

I have an ASP page which uses the funtion "escape()" on a field before I
write the data to the database. I use the unescape function before I display
the data on the web page. The part works fine. Now I put an Access Front End
on the desktop, connect it to the db via an ODBC connection. I have a texbox
control which contains the value that is "escaped". It get the escaped
string. In the control source for that textbox I write
"=unescape([fieldname])". Now I get #Name? in the texbox. I assume that the
problem is with the unescape funtion, but am not sure how to proceede from
here.

Any ideas?

Thanks.
Irvin.
 
D

Douglas J. Steele

What exactly are the Escape and Unescape functions?

You'll need to ensure that at least the Unescape function exists as a Public
Function in a code module in the Access front end.
 
I

Irvin Amoraal

Douglas,

Sorry about the personal email reply. It was unintentional. I meant to post
it here.

"escape()" is a built-in ASP function that prefixes special characters such
as @ and ' which have special meaning in SQL statements. I used it in my web
page code prior to inserting a record into my access 2000 database backend.
"unescape" would remove the escape characters after I retrieve them from the
back end so that I could write them to my web page.

To be honest, I don't know what escape character it uses (I think it may be
a backward slash "\" ?). I was hoping that Access might have a similar
built-in function.

I suppose I could simply try to find and replace backward slashes with a
zero-length string and see if that works.

Thanks.

Irvin Amoraal.

_____________________________

Douglas J. Steele said:
What exactly are the Escape and Unescape functions?

You'll need to ensure that at least the Unescape function exists as a Public
Function in a code module in the Access front end.

--
Doug Steele, Microsoft Access MVP



Irvin Amoraal said:
I have an ASP page which uses the funtion "escape()" on a field before I
write the data to the database. I use the unescape function before I display
the data on the web page. The part works fine. Now I put an Access Front End
on the desktop, connect it to the db via an ODBC connection. I have a texbox
control which contains the value that is "escaped". It get the escaped
string. In the control source for that textbox I write
"=unescape([fieldname])". Now I get #Name? in the texbox. I assume that the
problem is with the unescape funtion, but am not sure how to proceede from
here.

Any ideas?

Thanks.
Irvin.
 
D

Douglas J. Steele

You might be able to write your own routine using the
InternetCanonicalizeUrl API call (unfortunately, I couldn't find a sample to
point you to).

On the other hand, I can't find any evidence of an escape function in ASP:
you sure it's not a custom function to which you've got a reference? I found
an EscapeQuotes function on my MSDN CD, but couldn't find it at the
Microsoft site. (it says "Returns the string with apostrophes replaced with
an escaped version (\'). Used to correctly format text for use in JScript
code.")


--
Doug Steele, Microsoft Access MVP



Irvin Amoraal said:
Douglas,

Sorry about the personal email reply. It was unintentional. I meant to post
it here.

"escape()" is a built-in ASP function that prefixes special characters such
as @ and ' which have special meaning in SQL statements. I used it in my web
page code prior to inserting a record into my access 2000 database backend.
"unescape" would remove the escape characters after I retrieve them from the
back end so that I could write them to my web page.

To be honest, I don't know what escape character it uses (I think it may be
a backward slash "\" ?). I was hoping that Access might have a similar
built-in function.

I suppose I could simply try to find and replace backward slashes with a
zero-length string and see if that works.

Thanks.

Irvin Amoraal.

_____________________________

Douglas J. Steele said:
What exactly are the Escape and Unescape functions?

You'll need to ensure that at least the Unescape function exists as a Public
Function in a code module in the Access front end.

--
Doug Steele, Microsoft Access MVP



Irvin Amoraal said:
I have an ASP page which uses the funtion "escape()" on a field before I
write the data to the database. I use the unescape function before I display
the data on the web page. The part works fine. Now I put an Access
Front
End
on the desktop, connect it to the db via an ODBC connection. I have a texbox
control which contains the value that is "escaped". It get the escaped
string. In the control source for that textbox I write
"=unescape([fieldname])". Now I get #Name? in the texbox. I assume
that
the
problem is with the unescape funtion, but am not sure how to proceede from
here.

Any ideas?

Thanks.
Irvin.
 
I

Irvin Amoraal

Sigh,
Maybe I'm thinking PHP or mysql or maybe I'm just having a nightmare .... I
have no idea why it seemed to work.
Anyways, I taken a different approach. Instead of using an INSERT query on
the ASP page, I've opted to open an ADO recordset, assign each field its
approriate value, then update and close the recordset. This has resolved the
issue of reserved characters appearing in the INSERT query string.

BTW, I couldn't find anything on escape/unescape either.

Thanks for taking the time Doug.

Irvin.
_________________________________

Douglas J. Steele said:
You might be able to write your own routine using the
InternetCanonicalizeUrl API call (unfortunately, I couldn't find a sample to
point you to).

On the other hand, I can't find any evidence of an escape function in ASP:
you sure it's not a custom function to which you've got a reference? I found
an EscapeQuotes function on my MSDN CD, but couldn't find it at the
Microsoft site. (it says "Returns the string with apostrophes replaced with
an escaped version (\'). Used to correctly format text for use in JScript
code.")


--
Doug Steele, Microsoft Access MVP



Irvin Amoraal said:
Douglas,

Sorry about the personal email reply. It was unintentional. I meant to post
it here.

"escape()" is a built-in ASP function that prefixes special characters such
as @ and ' which have special meaning in SQL statements. I used it in my web
page code prior to inserting a record into my access 2000 database backend.
"unescape" would remove the escape characters after I retrieve them from the
back end so that I could write them to my web page.

To be honest, I don't know what escape character it uses (I think it may be
a backward slash "\" ?). I was hoping that Access might have a similar
built-in function.

I suppose I could simply try to find and replace backward slashes with a
zero-length string and see if that works.

Thanks.

Irvin Amoraal.

_____________________________
before
I
write the data to the database. I use the unescape function before I
display
the data on the web page. The part works fine. Now I put an Access Front
End
on the desktop, connect it to the db via an ODBC connection. I have a
texbox
control which contains the value that is "escaped". It get the escaped
string. In the control source for that textbox I write
"=unescape([fieldname])". Now I get #Name? in the texbox. I assume that
the
problem is with the unescape funtion, but am not sure how to
proceede
from
here.

Any ideas?

Thanks.
Irvin.
 

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