<CF_LDIFToQuery>

Reads data from the LDIF format into a query result set, which can then can be used just as if it came from a CFQUERY. The LDIF format is a simple text-based file format for exchanging data. Generally, LDIF is used to import/export data between LDAP-compliant applications.

NAME Required. The name to be assigned to the new query. Like the NAME parameter of the CFQUERY tag.
LDIFFILE The full filesystem path to a file that contains the LDIF-formatted data. For instance, if you go into your Address Book in Netscape Communicator and use Save As from the File menu to save the Address Book to disk, you could specify that file here to read the data into a query.
LDIFTEXT Required if LDIFFILE is not provided or blank. The LDIF-formatted data that you want read into the query. Use this parameter instead of LDIFFILE if you have the LDIF data in a variable or something, rather than in a file on disk.
COLUMNS Optional. The Column names that you want to exist in the new query, as a comma-separated list. Matching line from the LDIF data will be read into the query. Lines in the LDIF data that don't correspond to the column names you supply for COLUMNS will be discarded.

If COLUMNS is not provided or is blank, the tag will obtain the column names from the LDIF data "on the fly". Useful for when you don't know what fields exist in the LDIF file. Note that for a large amount of LDIF data, this may slow the tag down somewhat.

IGNORECOLUMNS If the list of column names is being obtained on-the-fly (that is, if COLUMNS is not supplied), then you can provide a comma-separated list of LDIF fields that you don't want to become columns in the new query. Use a * at the end of a name to indicate that you don't want any LDIF fields that start with that name.

Notes

Example

<CF_LDIFToQuery NAME="MyData" LDIFFILE="c:\temp\untitled.ldif" IGNORECOLUMNS="dn,xmozilla*"> The above code would create a query that would look like this:
CN SN GIVENNAME OBJECTCLASS MAIL LOCALITY ST TITLE POSTOFFICEBOX STREETADDRESS POSTALCODE COUNTRYNAME TELEPHONENUMBER FACSIMILETELEPHONENUMBER HOMEPHONE O DESCRIPTION
Amy GauthierGauthierAmytop|personagauthier@allaire.com            
Damian ManningManningDamiantop|persondmanning@icesinc.com            
Henry KauftheilKauftheilHenrytop|personhenryk@icesinc.com            
Jed FreemanFreemanJedtop|personjfreeman@icesinc.com            
Nate WeissWeissNatetop|personnweiss@icesinc.comNew YorkNYMIS Director220 West 19th StreetSuite 120010011USA212 647 8901212 647 8900212 689 1877ICES, Inc. 
Scott & Nancy WarnerWarnerScott & Nancytop|personwarner@infinet-is.com            
Stanley WilliamsWilliamsStanleytop|personsaw5s@virginia.edu            
Tanya WaldronWaldronTanyatop|persontwaldron@icesinc.com           VGhlIGNhdA0K


The data used in this example was as follows, exported from my Communicator Address Book.
dn: cn=Amy Gauthier,mail=agauthier@allaire.com
cn: Amy Gauthier
sn: Gauthier
givenname: Amy
objectclass: top
objectclass: person
mail: agauthier@allaire.com
xmozillanickname: amy
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0

dn: cn=Damian Manning,mail=dmanning@icesinc.com
cn: Damian Manning
sn: Manning
givenname: Damian
objectclass: top
objectclass: person
mail: dmanning@icesinc.com
xmozillanickname: damian
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0

dn: cn=Henry Kauftheil,mail=henryk@icesinc.com
cn: Henry Kauftheil
sn: Kauftheil
givenname: Henry
objectclass: top
objectclass: person
mail: henryk@icesinc.com
xmozillanickname: henry
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0

dn: cn=Jed Freeman,mail=jfreeman@icesinc.com
cn: Jed Freeman
sn: Freeman
givenname: Jed
objectclass: top
objectclass: person
mail: jfreeman@icesinc.com
xmozillanickname: jed
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0

dn: cn=Nate Weiss,mail=nweiss@icesinc.com
cn: Nate Weiss
sn: Weiss
givenname: Nate
objectclass: top
objectclass: person
locality: New York
st: NY
mail: nweiss@icesinc.com
title: MIS Director
postOfficeBox: 220 West 19th Street
streetaddress: Suite 1200
postalcode: 10011
countryname: USA
telephonenumber: 212 647 8901
facsimiletelephonenumber: 212 647 8900
homephone: 212 689 1877
o: ICES: Inc.
xmozillanickname: me
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0

dn: cn=Scott & Nancy Warner,mail=warner@infinet-is.com
cn: Scott & Nancy Warner
sn: Warner
givenname: Scott & Nancy
objectclass: top
objectclass: person
mail: warner@infinet-is.com
xmozillanickname: nancy
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0

dn: cn=Stanley Williams,mail=saw5s@virginia.edu
cn: Stanley Williams
sn: Williams
givenname: Stanley
objectclass: top
objectclass: person
mail: saw5s@virginia.edu
xmozillanickname: stan
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0

dn: cn=Tanya Waldron,mail=twaldron@icesinc.com
cn: Tanya Waldron
sn: Waldron
givenname: Tanya
objectclass: top
objectclass: person
description:: VGhlIGNhdA0K
mail: twaldron@icesinc.com
xmozillanickname: tanya
xmozillausehtmlmail: FALSE
xmozillauseconferenceserver: 0