don't know what exactly is wrong

  • Thread starter Thread starter Chris Ellis
  • Start date Start date
C

Chris Ellis

Hi,

I'm attempting to store Rich Text Format data in a memo field in an
Access2000 database. I am updating from an Access97 database in which I
used the same memo field to store plain text. I am programmatically
grabbing the text, applying RTF codes to it, and then attempting to store
that data in the same memo field in the new Access2000 database. I can't
even get past the first record. I am obviously forming a bad query, but I
don't know exactly what's wrong with it (or what to do to fix it). Here is
the exact query that is failing:

INSERT INTO Notes ([Title],[Note],[Date]) VALUES ('Bara vs.
Asah','{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\
fcharset0 Arial Black;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs24 In the
beginning, God CREATED (Bara)... bara speaks of creation, but in Genesis
1:26, God spoke of MAKING man in His image... make = Asah, which puts more
emphasis on fashioning that which is created... so, God created the
universe, but He is fashioning us into His image. Asah also deals with
refinement.\\par\r\n}\r\n\0',NULL);

sorry for that giant heap of garbage, but I do string concatenation to get
it how I want it. If it were all broken apart correctly, to be more
readable, it would look like this:

INSERT INTO
Notes
(
[Title],
[Note],
[Date]
)
VALUES
(
'Bara vs. Asah',

'{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fchars
et0 Arial Black;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs24 In the beginning, God
CREATED (Bara)... bara speaks of creation, but in Genesis 1:26, God spoke of
MAKING man in His image... make = Asah, which puts more emphasis on
fashioning that which is created... so, God created the universe, but He is
fashioning us into His image. Asah also deals with
refinement.\\par\r\n}\r\n\0',
NULL
);

The Title field is a Text field with a field size of 30
The Note field (which I'm sure is where the problem must be) is a Memo field
And the Date field is a Date/Time field set to General Date and is not
required.

Thanks in advance for any help,
Chris
 
Hi,
The SQL you posted executed fine for me (I did however call the date field 'myDate'
as Date is a reserved word). Are you getting an error of some kind? Do some of the records
have single quotes within the text?
 
Back
Top