Hi MS, yep, late last night I finally figured it out! Yes, it is exactly what you posted above syntax-wise. Thanks for replying to this thread. For the record, here's what I learned about doing an ODBC to a text file. It really has nothing to do with JSL, but rather the industry convention/syntax required to do ODBC to a text file itself:
a. Create schema.ini - must create this file to support the text file format. Place it in the same directory as the text file. Easy to create via Notepad. Google schema.ini for ODBC text file for details.
b. Use correct ODBC syntax - unlike say Excel ODBC DBQ string, text file ODBC DBQ string does not reference the path+filename but rather just the path. This is what I got hung up on. So this is what works (just as you posted above - the key is to reference the DBQ=<path> and not DBQ=<path+filename> and then split up the filename into the SQL FROM statement):
dt_csv=open database("DSN=Text File;DBQ=C:\;","SELECT * FROM Data.csv","Result");
c. Minor detail - just a note. If you're using Win7, there are two different locations for the ODBC Manager. One is the 32 bit location and the other is the 64 bit location. Microsoft named them like Greenland and Iceland (sort of misleading). Just be aware of this when/if you're adding/modifying say the ODBC Text File driver. I hear in Win8 that they may make these separate names or identifiers somehow.
Win7 ODBC Managers:
32 bit: C:\Windows\SysWOW64\odbcad32.exe
64 bit: C:\Windows\System32\odbcad32.exe
Anyways, the above a.) + b.) does allow me to use JSL to ODBC to a raw text file. Very nice... ...dj