I have a list I obtained from export ldap members out of a ldap directory in
LDIF format that looks like this:

memberUserName: John Doe
memberAge: 34
memberLocation: US
memberEmail: [EMAIL PROTECTED]

 memberUserName: Mary Doe
memberAge: 44
memberLocation: US
memberEmail: [EMAIL PROTECTED]

 memberUserName: Jack Doe
memberAge: 86
memberLocation: US
memberEmail: [EMAIL PROTECTED]

I need to import this list of almost 18,000 members onto an SQL database. So
what I want to do is to convert this LDIF file into one big list pipe
delimited, then loop through it and add it to the database. So I got:

1) File is read
<cffile action="read" variable="cffileRead"
file="#expandPath(/imports/testList.ldif)#" />

2) Replace all new lines for commas
<cfset newLine = chr(13) & chr(10) />
<cfset commaList = replace(cffileRead, newLine, ',', 'All' />

Question here: How do I replace all EMPTY (BLANK LINES) like the ones
between memberUserName for pipes?


------------------------------------------------------------
Ravi Gehlot
Web Programmer & IT Specialist

Sunshine Tech Solutions, LLC
http://www.sunshinetechsolutions.com
[EMAIL PROTECTED]
President
------------------------------------------------------------


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303707
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to