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 ? 4 3435
On Sep 01 2004, 05:13 am, cl*****@memrb.c om.cy (CLarkou) wrote in
news:db******** *************** **@posting.goog le.com: 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
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("s elect_items")
Set db_set = db_query.OpenRe cordset()
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!
-----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:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQTZfoIechKq OuFEgEQLgKwCgyh t5htLu6puCOjiBV MxRBLVCE5oAoKZj
JZAf3pF7aR4LlET tBn9P5I1X
=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("s elect_items")
Set db_set = db_query.OpenRe cordset() 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
Thanks for the tip for db_query=nothin g. 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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 field, and
it works. But, it seems wrong since I had to create a huge text box to
accommodate memo fields with a lot of text.
Thanks for any help,
ShyGuy
|
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. I would like to
figure a way to combine all the "note" fields for each person into one memo
field.
Thank you
|
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 memo still cuts
it short. TransferText cut it short too. Someone suggested that I
use the following code. It works, but it populates only one row of
the text. Missing something critical.
Any ideas on how to get this to work?
'Beginning of...
|
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 position but
there are 420 positions.
What's going on?
|
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 datatype to save them in.
The problem is sometimes I can only retrieve the first 255 characters
in a memo field and other times I can retrieve the full product
| |
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 separate table having two
fields only (i.e.: n_memo integer, memo text) which can be related to
the main table in a view.
|
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 written in file are not the sent bytes.
Copy and paste the following lines to observe my problem.
What can I do to resolve problem ?
Only System.Text.Encoding.ASCII write the same number of bytes, but not the
good bytes.
Someone can help me. Thanks by...
|
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 should.
I have tried to import it by code - I have created a target table in
Access where the "LongText" field, the last one, is of type Memo. Then
I have tried to open the text file with an OpenDatabase command, then
go thru the recordset...
|
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 table today, it is linked as a text(255) field,
ditto for the first table if I link it today
if I link the 2nd table using access2003 (and the same odbc data
source) it is linked as a memo field
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |