Link to home
Create AccountLog in
Avatar of veasnamuch

asked on

ASP with MsAccess - Input Mask field

I have problem on retrieving data from MsAccess table. I have a table [tblOperation] which have a field name Opr_Number with Input Mask = !"PO 07"/0000. When retrieve data throught Recordset, i have only the part of 0000 but not the whole string as  PO 07/0000.

Best reagrds,

Avatar of Mark Franz
Mark Franz
Flag of United States of America image

The quotes are what is causing your problem, you need to escape the retrieved string to post the data correctly.  First, are you sure the data is in the dB correctly?  If so then you need to parse the data as a text string and decode the data with the quotes intact.

Can we see your code that posts the retrieved data?  It might be as simple as using HTMLDecode() in your retrieved recordset.
Avatar of veasnamuch


Yes sure, the data in Ms Access in tblOperation is correct. When I open the table, I have seen the value
PO 07/0251
PO 07/0235
PO 07/0215
PO 07/0248
PO 07/0247
PO 07/0238

but when I do response.write in my ASP code, I got only


The following is the script that I use to retrieve data

set oRs = Server.CreateObject("ADODB.recordset") "SELECT * FROM tblOperation", oConn                              
if not oRs.EOF then
      do until oRs.EOF
            response.write(oRs("Opr_Number") &"<br>")
end if
Set oRs = Nothing
I'm unable to duplicate your problem.  Are you familiar with FSO?  Try exporting the dat to a .txt file and see if it gets written correctly.

What are the field properties in Access?
  I feel that my data store in my MsAccess table is only the part of 0000 and the other part PO 07/  is just used to display the data and while we retrieve the RecordSet from that table we had only 0000 part enstead of the whole one PO 07/2328.
The attachement is the fied property of my Access table.

Best regards,
Avatar of Mark Franz
Mark Franz
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
  Thanks by the way for your time in involving to resolve my problem. I already skip it now by manual manipulate my data with these input mask.

Nice day
I think the comments I provided were an acceptable assist in answering the question.
Force accepted.
Experts Exchange Moderator