473,320 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

WRITE #1 to a text file - MEMO fields

I am using the following for writing to a file some data:

Open var_export_file For Output As #1

Write #1,.......

One of the values I want to write to the file comes from a MEMO file.
Only 255 characters are written from the memo field, the rest are
invalid characters.

Is there a simple solution for this ?
Nov 13 '05 #1
4 3428
On Sep 01 2004, 05:13 am, cl*****@memrb.com.cy (CLarkou) wrote in
news:db*************************@posting.google.co m:
I am using the following for writing to a file some data:

Open var_export_file For Output As #1

Write #1,.......

One of the values I want to write to the file comes from a MEMO file.
Only 255 characters are written from the memo field, the rest are
invalid characters.

Is there a simple solution for this ?


Try using Put instead of Write. If that doesn't help, post the actual code
you are using.

--
remove a 9 to reply by email
Nov 13 '05 #2
I checked in help for PUT command, but it should be used for binary or
random files.

This is the code I am using: (The Alias_descr field is a memo field)

Set db_query = db.QueryDefs("select_items")

Set db_set = db_query.OpenRecordset()
Set db_query = Nothing

Open var_export_file For Output As #1

Do While Not db_set.EOF
Write #1, db_set![dimension_no], db_set![Level_no],
db_set![Alias_descr], db_set![Heading_Title], db_set![calculated]

db_set.MoveNext
Loop

Set db_set = Nothing

Close #1


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Don't do this "db_query = Nothing" until after the loop, 'cuz db_set
refers db_query QueryDef. I've found its best to clean up (set =
nothing) only at the end of the routine.

Use Print #1 when exporting just text.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQTZfoIechKqOuFEgEQLgKwCgyht5htLu6puCOjiBVMxRBL VCE5oAoKZj
JZAf3pF7aR4LlETtBn9P5I1X
=Oo4M
-----END PGP SIGNATURE-----
Christina Larkou wrote:
I checked in help for PUT command, but it should be used for binary or
random files.

This is the code I am using: (The Alias_descr field is a memo field)

Set db_query = db.QueryDefs("select_items")

Set db_set = db_query.OpenRecordset()
Set db_query = Nothing

Open var_export_file For Output As #1

Do While Not db_set.EOF
Write #1, db_set![dimension_no], db_set![Level_no],
db_set![Alias_descr], db_set![Heading_Title], db_set![calculated]

db_set.MoveNext
Loop

Set db_set = Nothing

Close #1


Nov 13 '05 #4
Thanks for the tip for db_query=nothing. I am using WRITE because of the
several universal assumptions that follows. Print has the same problem
as Write for MEMO fields.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
1
by: RR | last post by:
Is there a way to combine text fields into one memo field? This is an existing database. Some people in the database may have several "contact" entries where they have a "note" in a text field. ...
4
by: R Bolling | last post by:
I have a text file from a text document that has very long rows (two or three paragraphs from a text document for each row). Importing to text cuts it off at 255 characters, and importing to a...
1
by: Steemer | last post by:
Okay, I checked with usual suspects and I'm still frustrated. ..txt file, fixed width. About 88 fields of varying length. All text fields. It will only let me add seperators to about the 410th...
5
by: sling blade | last post by:
Hi, I have an web app and I am using access 2002 and VB.net. I am using a data adapter to fill a dataset. I am retrieving product descriptions, some are long and i have used a field of memo...
0
by: Ennio-Sr | last post by:
Hi all! After a very long struggle I finally succeded in transferring my old *.dbf file and the relating *.dbt (alias memo fields) to a pg table. For the time being I put the memo field in a...
5
by: philip | last post by:
Here is some lines of code than I wrote. You can copy/paste theis code as code of form1 in a new project. My problem is this one : I try to write in a file a serie of bytes. BUT some bytes...
2
by: Radu | last post by:
Hi. I got a "|" delimited file, and one of its columns (the last one) is MANY chars long. If I use my try to manually import the file, the text in the last column is cut off at char 255, as it...
2
by: Roger | last post by:
I've got two tables in sql2005 which have an 'ntext' field when I linked the first table in access97 last week using an odbc data source the access-field type was 'memo' when I link the 2nd...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.