Re: Parsing / ' " characters
- From: John Nurick <j.mapSoN.nurick@xxxxxxxxxxxxxx>
- Date: Wed, 23 Nov 2005 07:49:12 +0000
This can get complicated, but let's start with the simple questions.
1) What do you mean by "the insert statement doesn't execute"? I presume
that's what's actually happening is that you have a statement like
CurrentDB.Execute strSQL
which is being executed but that some or all of the records are not
being appended.
2) Is the problem in the linking or in the appending? Open the linked
table in data*** view and inspect some of the records that you know
from the text file should contain quote marks or the other characters
you mention. Do they appear correctly in the linked table? If not, the
problem is either in the text file or in the way you linked the table.
3) Open the text file in Notepad or another text editor. As I understand
it from what you've said, you're treating each line as a single field.
Does every line begin and end with a quote (") character? (i.e. each
field is "qualified" with guote marks) This is what Access expects of a
linked text file unless you tell it otherwise.
If the lines are just plain text not "qualified" with quotes, you need
to specify this when you link the text file, either in the text import
wizard or with an import/export specification. Otherwise, quotes within
the data are likely to make the import/link routine go wrong.
On Tue, 22 Nov 2005 21:46:45 -0500, "J Shrimps, Jr."
<JumboShrimps@xxxxxxxxxxx> wrote:
>
>Have a lnked text file I need to
>extract data from - only one character field
>in file, but some of the records have
>// ' " characters, so when I try to
>insert them into a temporary table with
> strSQL = "Insert Into tmpExport ( Code )" _
>& "Select " & StrTblName & ".[CODE] from" & StrTblName & ";"
>However, when some of these funky characters are encountered
>in the field CODE, then the insert statement doesn't execute.
>I'm assuming Access is interpreting the // " ' characters as some kind of
>delimiter.
>How can I mask these characters so Access can append them
>(through code) to another table?
>
>
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
.
- Follow-Ups:
- Re: Parsing / ' " characters
- From: J Shrimps, Jr.
- Re: Parsing / ' " characters
- References:
- Parsing / ' " characters
- From: J Shrimps, Jr.
- Parsing / ' " characters
- Prev by Date: Re: huge file
- Next by Date: Re: Replica with no data
- Previous by thread: Parsing / ' " characters
- Next by thread: Re: Parsing / ' " characters
- Index(es):