• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

Displaying field that contains multi line

Hi,
I have a simple web interface where administrators can add customer data.  From the browser, admin will enter several info. The address field will sometimes have several lines, e.g.

No 3, BLOCK A,
PRIMA SQUARE.

I'm using the DevExpress Gridview to achieve this goal, and from the web page, the lines are recognized.

However, some of our backoffice users use a MS Access interface to generate invoices, etc.  When the address was entered from the web page, the carriage returns don't seem to follow through.

I can't do a replace in MS Access because i'm not sure what to look for. I know the characters are hidden in the text somewhere, because exporting from the access table to excel shows the fields with multi lines.

I'm attaching some screenshots of the different views.

Any ideas?

Thanks.
access-report.JPG
fromWebpage.JPG
exportedFromAccessTableToExcel.JPG
notepadplus.JPG
0
GCCTECHIE
Asked:
GCCTECHIE
  • 2
  • 2
1 Solution
 
peter57rCommented:
Access requires Chr(13) & chr(10) for a new line.

Obviously I don't know what your source data uses.
0
 
GCCTECHIEAuthor Commented:
hi,
i'm not sure what it uses, since i can't see it.

i'm attaching the db, if it can be of any help.
AccessInterface.mdb
0
 
mbizupCommented:
Excel uses CHR(10) for newlines....

Make a backup of your data and try this update query to replace Chr(10) with Chr(13) & Chr(10):

UPDATE CUSTOMER
SET Address =  Replace([Address],Chr(10),Chr(13) & Chr(10))

Open in new window


This worked for me in your sample.
0
 
GCCTECHIEAuthor Commented:
Hi mbizup,

thanks...that solution worked for me.
0
 
mbizupCommented:
Glad that worked out :-)
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now