[AccessD] Import Large delimited file with special character s

Bobby Heid bheid at appdevgrp.com
Wed Jul 19 11:24:53 CDT 2006


if mid$(str,i-1)<>"." then

should read

if mid$(str,i-1,1)<>"." then

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bobby Heid
Sent: Wednesday, July 19, 2006 12:11 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Import Large delimited file with special character s


Or, you could use replace to get rid of them all, then use replace to
replace each "." with "." & vbcrlf.  This should work unless there are other
periods in the text.

Alternatively, do a find on each crlf, then check the character before the
found crlf and see if it is a period, if it is, then skip the deletion of
the crlf.

Air code:

i=instr(1,str,vbcrlf)
do while i<>0
	if i<>1 then	'if crlf is not the 1st chars
	   if mid$(str,i-1)<>"." then
		str=left$(str,i-1) & right$(str,len(str)-i-1)	'I think the
-1 will work
		end if
         else
            str=right$(str,len(str)-2)	'get all but 2st 2 chars since crlf
at front
	   end if
	i=instr(i,str,vbcrlf)
	loop

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Wednesday, July 19, 2006 11:29 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Import Large delimited file with special character s


 
Search for two of them together and replace them with one.  That will
clear out any extras.

Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Wednesday, July 19, 2006 8:25 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Import Large delimited file with special
character s

Thanks Marty...but not all of the CR and LF need to be replaced.  There
still needs to be one at the end of each line.




>From: MartyConnelly <martyconnelly at shaw.ca>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>Subject: Re: [AccessD] Import Large delimited file with special
character s
>Date: Tue, 18 Jul 2006 15:25:46 -0700
>
>   strAddress  =Replace (strAddress, Chr(13) & Chr(10), "")
>or if you want a space
>   strAddress  =Replace (strAddress, Chr(13) & Chr(10), " ")
>
>Mark A Matte wrote:
>
> >Thanks Drew,
> >
> >....but the issue would be 'How do you tell the right from the wrong?
> >
> >Thanks,
> >
> >Mark
> >
> >
> >
> >
> >>From: DWUTKA at marlow.com
> >>Reply-To: Access Developers discussion and problem
> >>solving<accessd at databaseadvisors.com>
> >>To: accessd at databaseadvisors.com
> >>Subject: Re: [AccessD] Import Large delimited file with special 
>character	s
> >>Date: Tue, 18 Jul 2006 16:09:36 -0500
> >>
> >>The Replace() function??
> >>
> >>Drew
> >>
> >>-----Original Message-----
> >>From: Mark A Matte [mailto:markamatte at hotmail.com]
> >>Sent: Tuesday, July 18, 2006 3:59 PM
> >>To: accessd at databaseadvisors.com
> >>Subject: [AccessD] Import Large delimited file with special
characters
> >>
> >>Hello All,
> >>
> >>I've been back and forth with this issue.  I think some here helped
me 
>with
> >>this years ago.  Importing a large delimited text file...that has a
> >>text/memo/blob field.  I'm running into CR or LF in the blob.  Is
there 
>a
> >>way to remove these characters...I seem to remember someone telling
a 
>way
> >>to
> >>
> >>loop through and replace these characters...but I can't find it.
> >>
> >>Any have ideas?
> >>
> >>Thanks,
> >>
> >>Mark
> >>
> >>
> >>--
> >>AccessD mailing list
> >>AccessD at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/accessd
> >>Website: http://www.databaseadvisors.com
> >>--
> >>AccessD mailing list
> >>AccessD at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/accessd
> >>Website: http://www.databaseadvisors.com
> >>
> >>
> >
> >
> >
> >
>
>--
>Marty Connelly
>Victoria, B.C.
>Canada
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list